From 73430f9132fe876d7643e4dc472e210c40d31240 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Wed, 14 Oct 2015 21:21:03 +0200 Subject: [PATCH] [DEV] update new lutin 0.8.0 --- lutin_ejson-test.py | 43 ++++++++++++++++++++++++++----------------- lutin_ejson.py | 31 +++++++++++++++++++++---------- test/test.cpp | 2 +- test/testCommon.h | 6 +++--- 4 files changed, 51 insertions(+), 31 deletions(-) diff --git a/lutin_ejson-test.py b/lutin_ejson-test.py index bc255a6..64bbb18 100644 --- a/lutin_ejson-test.py +++ b/lutin_ejson-test.py @@ -3,33 +3,42 @@ 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_name(): + return "e-json-test" + def get_desc(): return "e-json test application" +def get_licence(): + return "APACHE-2" -def create(target): - # module name is 'edn' and type binary. - my_module = module.Module(__file__, 'ejson-test', 'BINARY') - - # add the file to compile: +def get_compagny_type(): + return "com" + +def get_compagny_name(): + return "atria-soft" + +def get_maintainer(): + return ["Mr DUPIN Edouard "] + +def create(target, module_name): + my_module = module.Module(__file__, module_name, get_type()) my_module.add_src_file([ - 'test/test.cpp']) - - my_module.add_module_depend(['ejson', 'gtest']) - + 'test/test.cpp' + ]) + my_module.add_module_depend(['ejson', 'gtest', 'test-debug']) now = datetime.datetime.now() versionID=str(now.year-2012)+"."+str(now.month)+"."+str(now.day) - # set the package properties : my_module.pkg_set("VERSION", versionID) - my_module.pkg_set("COMPAGNY_TYPE", "org") - my_module.pkg_set("COMPAGNY_NAME", "Edouard DUPIN") - my_module.pkg_set("MAINTAINER", ["Mr DUPIN Edouard "]) my_module.pkg_set("SECTION", ["Development"]) my_module.pkg_set("PRIORITY", "optional") - my_module.pkg_set("DESCRIPTION", "e-json tester soft") - my_module.pkg_set("NAME", "exml_tester") - - # add the currrent module at the return my_module diff --git a/lutin_ejson.py b/lutin_ejson.py index 3343607..4fbba58 100644 --- a/lutin_ejson.py +++ b/lutin_ejson.py @@ -2,16 +2,31 @@ import lutin.module as module import lutin.tools as tools + +def get_type(): + return "LIBRARY" + def get_desc(): - return "e-json Json parser and generator" + return "Json parser and generator" +def get_licence(): + return "APACHE-2" -def create(target): - my_module = module.Module(__file__, 'ejson', 'LIBRARY') - +def get_compagny_type(): + return "com" + +def get_compagny_name(): + return "atria-soft" + +def get_maintainer(): + return ["Mr DUPIN Edouard "] + +def get_version(): + return [0,0,0] + +def create(target, module_name): + my_module = module.Module(__file__, module_name, get_type()) my_module.add_module_depend(['etk']) - - # add extra compilation flags : my_module.add_extra_compile_flags() my_module.add_src_file([ 'ejson/debug.cpp', @@ -24,7 +39,6 @@ def create(target): 'ejson/Object.cpp', 'ejson/Value.cpp' ]) - my_module.add_header_file([ 'ejson/ejson.h', 'ejson/Array.h', @@ -35,10 +49,7 @@ def create(target): 'ejson/Object.h', 'ejson/Value.h' ]) - my_module.add_path(tools.get_current_path(__file__)) - - # add the currrent module at the return my_module diff --git a/test/test.cpp b/test/test.cpp index 44a5d4a..30b092f 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/testCommon.h b/test/testCommon.h index 00704ea..3ebd685 100644 --- a/test/testCommon.h +++ b/test/testCommon.h @@ -11,7 +11,7 @@ #define __EJSON_TEST_COMMON_H__ #include -#include +#include #include // _errorPos : -1 : no error , 1 : parsing error, 2 generation error, 3 comparaison error ???? @@ -45,11 +45,11 @@ static void localTest(const std::string& _ref, const std::string& _input, int32_ //JSON_ERROR("reference : \n" << l_list[iii].m_ref); for (int32_t jjj=0; jjj=tmpref.size() || tmpref[jjj] != tmpout[jjj]) { - JSON_ERROR("[" << jjj << "] " << tmpout[jjj] ); + TEST_ERROR("[" << jjj << "] " << tmpout[jjj] ); } } }