[DEV] add basis of test for ewol
This commit is contained in:
parent
000644204a
commit
04756d72ea
@ -67,7 +67,7 @@ before_script:
|
||||
export PATH=$PATH:/Users/travis/Library/Python/2.7/bin/;
|
||||
fi
|
||||
|
||||
script:
|
||||
script:
|
||||
- lutin -w -j4 -C -P -c $BUILDER $COMPILATOR_OPTION -m $CONF $GCOV -p ewol-test 0XX_customwidget 001_HelloWord
|
||||
|
||||
|
||||
|
14
README.md
14
README.md
@ -3,7 +3,21 @@ Ewol
|
||||
|
||||
`Ewol` (Edn Widget OpenGl Layer) is a FREE software.
|
||||
|
||||
Release (master)
|
||||
----------------
|
||||
|
||||
[![Build Status](https://travis-ci.org/atria-soft/ewol.svg?branch=master)](https://travis-ci.org/atria-soft/ewol)
|
||||
[![Coverage Status](http://atria-soft.com/ci/coverage/atria-soft/ewol.svg?branch=master)](http://atria-soft.com/ci/atria-soft/ewol)
|
||||
[![Test Status](http://atria-soft.com/ci/test/atria-soft/ewol.svg?branch=master)](http://atria-soft.com/ci/atria-soft/ewol)
|
||||
[![Warning Status](http://atria-soft.com/ci/warning/atria-soft/ewol.svg?branch=master)](http://atria-soft.com/ci/atria-soft/ewol)
|
||||
|
||||
Developement (dev)
|
||||
------------------
|
||||
|
||||
[![Build Status](https://travis-ci.org/atria-soft/ewol.svg?branch=dev)](https://travis-ci.org/atria-soft/ewol)
|
||||
[![Coverage Status](http://atria-soft.com/ci/coverage/atria-soft/ewol.svg?branch=dev)](http://atria-soft.com/ci/atria-soft/ewol)
|
||||
[![Test Status](http://atria-soft.com/ci/test/atria-soft/ewol.svg?branch=dev)](http://atria-soft.com/ci/atria-soft/ewol)
|
||||
[![Warning Status](http://atria-soft.com/ci/warning/atria-soft/ewol.svg?branch=dev)](http://atria-soft.com/ci/atria-soft/ewol)
|
||||
|
||||
Instructions
|
||||
============
|
||||
|
37
lutin_ewol-test.py
Normal file
37
lutin_ewol-test.py
Normal file
@ -0,0 +1,37 @@
|
||||
#!/usr/bin/python
|
||||
import lutin.module as module
|
||||
import lutin.tools as tools
|
||||
import datetime
|
||||
|
||||
|
||||
def get_type():
|
||||
return "BINARY"
|
||||
|
||||
def get_sub_type():
|
||||
return "TEST"
|
||||
|
||||
def get_desc():
|
||||
return "ewol test software"
|
||||
|
||||
def get_licence():
|
||||
return "APACHE-2"
|
||||
|
||||
def get_compagny_type():
|
||||
return "com"
|
||||
|
||||
def get_compagny_name():
|
||||
return "atria-soft"
|
||||
|
||||
def get_maintainer():
|
||||
return ["Mr DUPIN Edouard <yui.heero@gmail.com>"]
|
||||
|
||||
def create(target, module_name):
|
||||
my_module = module.Module(__file__, module_name, get_type())
|
||||
my_module.add_src_file([
|
||||
'test/main.cpp',
|
||||
'test/testApplication.cpp',
|
||||
'test/testWindows.cpp'
|
||||
])
|
||||
my_module.add_module_depend(['ewol', 'gtest', 'test-debug'])
|
||||
return my_module
|
||||
|
38
test/main.cpp
Normal file
38
test/main.cpp
Normal file
@ -0,0 +1,38 @@
|
||||
/**
|
||||
* @author Edouard DUPIN
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <etk/types.h>
|
||||
#include <test-debug/debug.h>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <etk/Hash.h>
|
||||
#include <etk/os/FSNode.h>
|
||||
#include <etk/archive/Archive.h>
|
||||
#include <etk/log.h>
|
||||
#include <etk/Color.h>
|
||||
#include <etk/stdTools.h>
|
||||
#include <string>
|
||||
|
||||
#define NAME "Empty"
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "ewol-test"
|
||||
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
// init Google test :
|
||||
::testing::InitGoogleTest(&argc, const_cast<char **>(argv));
|
||||
// the only one init for etk:
|
||||
//etk::log::setLevel(etk::log::logLevelVerbose);
|
||||
etk::log::setLevel(etk::log::logLevelInfo);
|
||||
etk::setArgZero(argv[0]);
|
||||
etk::initDefaultFolder("ewol-test");
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
|
22
test/testApplication.cpp
Normal file
22
test/testApplication.cpp
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @author Edouard DUPIN
|
||||
*
|
||||
* @copyright 2015, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <test-debug/debug.h>
|
||||
#include <ewol/context/Context.h>
|
||||
#include <gtest/gtest.h>
|
||||
#define NAME "Application"
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "TestEwolApplication"
|
||||
|
||||
TEST(TestEwolApplication, Creation) {
|
||||
ewol::context::Application* tmpAppl = new ewol::context::Application();
|
||||
EXPECT_NE(tmpAppl, nullptr);
|
||||
delete tmpAppl;
|
||||
}
|
||||
|
42
test/testWindows.cpp
Normal file
42
test/testWindows.cpp
Normal file
@ -0,0 +1,42 @@
|
||||
/**
|
||||
* @author Edouard DUPIN
|
||||
*
|
||||
* @copyright 2015, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <test-debug/debug.h>
|
||||
#include <ewol/widget/Windows.h>
|
||||
#include <gtest/gtest.h>
|
||||
#define NAME "Windows"
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "TestEwolWindows"
|
||||
|
||||
namespace appl {
|
||||
class Windows : public ewol::widget::Windows {
|
||||
protected:
|
||||
Windows() {
|
||||
addObjectType("appl::Windows");
|
||||
}
|
||||
void init() {
|
||||
ewol::widget::Windows::init();
|
||||
setTitle("test set");
|
||||
}
|
||||
public:
|
||||
DECLARE_FACTORY(Windows);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
TEST(TestEwolWindows, Creation) {
|
||||
/*
|
||||
std::shared_ptr<appl::Windows> tmpWindows = appl::Windows::create();
|
||||
EXPECT_NE(tmpWindows, nullptr);
|
||||
tmpWindows.reset();
|
||||
*/
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user