File: gui_test.cpp

package info (click to toggle)
filezilla 3.69.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 31,772 kB
  • sloc: cpp: 97,617; ansic: 54,984; sh: 5,225; makefile: 2,080; xml: 375
file content (25 lines) | stat: -rw-r--r-- 585 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <iostream>
#include <string>
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <cppunit/ui/text/TestRunner.h>
#include <locale.h>
#include <wx/init.h>

int main(int, char*[])
{
	setlocale(LC_ALL, "");

	if (!wxInitialize())
	{
		std::cout << "Failed to initialize wxWidgets" << std::endl;
		return 1;
	}

	CppUnit::TextUi::TestRunner runner;
	CppUnit::TestFactoryRegistry &registry = CppUnit::TestFactoryRegistry::getRegistry();
	runner.addTest(registry.makeTest());
	bool wasSuccessful = runner.run("", false);

	wxUninitialize();
	return wasSuccessful ? 0 : 1;
}