diff --git a/etest/etest.cpp b/etest/etest.cpp index ec22e59..29b609b 100644 --- a/etest/etest.cpp +++ b/etest/etest.cpp @@ -10,9 +10,7 @@ #include #include #include -#include #include -//#include static int32_t nbTimeInit = 0; diff --git a/etk-core/Set.hpp b/etk-core/Set.hpp index 03d7001..d3191fd 100644 --- a/etk-core/Set.hpp +++ b/etk-core/Set.hpp @@ -8,6 +8,7 @@ #include #include #include +#include namespace etk { /** @@ -241,9 +242,10 @@ namespace etk { */ void sort() { if (m_comparator != null) { - m_data.sort(0, m_data.size(), m_comparator); + etk::algorithm::quickSort(m_data, m_comparator); } else { - m_data.sort(0, m_data.size(), [](const ETK_SET_TYPE& _key1, const ETK_SET_TYPE& _key2) { return _key1 < _key2; }); + sortFunction comparator = [](const ETK_SET_TYPE& _key1, const ETK_SET_TYPE& _key2) { return _key1 < _key2; }; + etk::algorithm::quickSort(m_data, comparator); } } public: diff --git a/etk-core/stdTools.hpp b/etk-core/stdTools.hpp index f93b8ba..ebfba78 100644 --- a/etk-core/stdTools.hpp +++ b/etk-core/stdTools.hpp @@ -4,7 +4,10 @@ * @license MPL v2.0 (see license file) */ #pragma once -//#include +#include +extern "C" { + #include +} namespace etk { inline float cos(float _value) { diff --git a/etk/etk.cpp b/etk/etk.cpp index 55689c7..3098f51 100644 --- a/etk/etk.cpp +++ b/etk/etk.cpp @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include @@ -60,15 +59,17 @@ void etk::init(int _argc, const char** _argv) { if (_argc >= 1) { TK_PRINT(" " << _argv[0] << " [options]"); } - TK_PRINT(" --etk-base-path=name Change the default USERDATA: generic name"); + //TK_PRINT(" --etk-base-path=name Change the default USERDATA: generic name"); /* TK_PRINT(" --etk-log-lib=name:X Set a library specific level:"); TK_PRINT(" name Name of the library"); TK_PRINT(" X Log level to set [0..6]"); */ TK_PRINT(" -h/--help: this help"); + /* } else if (data.startWith("--etk-base-path=") == true) { etk::forcePathUserData(etk::String(&data[16])); + */ } else if (data.startWith("--etk") == true) { TK_ERROR("Can not parse the argument : '" << data << "'"); } @@ -81,5 +82,5 @@ void etk::init(int _argc, const char** _argv) { } etk::String etk::getApplicationName() { - return etk::FSNodeGetApplicationName(); + return etk::fs::getBinaryName(); } diff --git a/etk/fs/Permissions.cpp b/etk/fs/Permissions.cpp index 34f2c6c..6117415 100644 --- a/etk/fs/Permissions.cpp +++ b/etk/fs/Permissions.cpp @@ -5,7 +5,6 @@ */ -#include #include #include #include diff --git a/etk/tool.cpp b/etk/tool.cpp index 96c3159..523631f 100644 --- a/etk/tool.cpp +++ b/etk/tool.cpp @@ -5,7 +5,7 @@ */ #include -#include +#include extern "C" { #include #include diff --git a/lutin_etk-test.py b/lutin_etk-test.py index f3bacfd..18d0232 100644 --- a/lutin_etk-test.py +++ b/lutin_etk-test.py @@ -34,8 +34,6 @@ def configure(target, my_module): 'test/testUri.cpp', 'test/testQuery.cpp', 'test/testUriProvider.cpp', - ]) - """ 'test/ConstructDestruct.cpp', 'test/testColor.cpp', 'test/testFunction.cpp', @@ -48,8 +46,6 @@ def configure(target, my_module): 'test/testArray.cpp', 'test/testVector.cpp', 'test/testVector3_f.cpp', - 'test/testArchive.cpp', - 'test/testFSNode.cpp', 'test/testMatrix2x2.cpp', 'test/testQuaternion.cpp', 'test/testVector2_f.cpp', @@ -57,7 +53,7 @@ def configure(target, my_module): 'test/testTrait.cpp', 'test/testThrow.cpp', 'test/testUTF8.cpp', - """ + ]) my_module.add_depend([ 'etk', 'etest', diff --git a/lutin_etk.py b/lutin_etk.py index 66e3585..bea1054 100644 --- a/lutin_etk.py +++ b/lutin_etk.py @@ -53,8 +53,6 @@ def configure(target, my_module): 'etk/math/Vector4D.cpp', 'etk/math/Quaternion.cpp', 'etk/math/Transform3D.cpp', - 'etk/os/FSNode.cpp', - 'etk/os/FSNodeRight.cpp', 'etk/archive/Archive.cpp', 'etk/archive/Zip.cpp', 'etk/uri/Uri.cpp', @@ -91,8 +89,6 @@ def configure(target, my_module): 'etk/math/Quaternion.hpp', 'etk/math/Transform3D.hpp', 'etk/os/Fifo.hpp', - 'etk/os/FSNode.hpp', - 'etk/os/FSNodeRight.hpp', 'etk/archive/Archive.hpp', 'etk/archive/Zip.hpp', 'etk/TreeNode.hpp', diff --git a/test/testArchive.cpp b/test/testArchive.cpp deleted file mode 100644 index f37fde0..0000000 --- a/test/testArchive.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license MPL v2.0 (see license file) - */ - -#include -#define NAME "Archive" -#include -#include - -#ifdef ETK_BUILD_MINIZIP - -TEST(TestEtkArchive, CreationWrong) { - etk::Archive* tmpArchive = etk::Archive::load("nonExistantFile.zip"); - EXPECT_NE(tmpArchive, null); -} - -/* -TEST(TestEtkArchive, Display) { - etk::Archive* tmpArchive = etk::Archive::load("nonExistantFile.zip"); - ASSERT_NEQ(tmpArchive, null); - tmpArchive->display(); -} -*/ - -#endif diff --git a/test/testFSNode.cpp b/test/testFSNode.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/test/testUTF8.cpp b/test/testUTF8.cpp index 2ed9457..4a9e998 100644 --- a/test/testUTF8.cpp +++ b/test/testUTF8.cpp @@ -9,7 +9,7 @@ #include #include #include "ConstructDestruct.hpp" - +/* TEST(TestUTF8, full) { // Test contructor value for (uint32_t jjj=0; jjj<0XFF; ++jjj) { @@ -22,4 +22,14 @@ TEST(TestUTF8, full) { EXPECT_EQ(inputValue, outputValue); } } -} \ No newline at end of file +} +*/ + +TEST(TestUTF8, simple) { + char32_t inputValue = U'é'; + char output[7]; + u32char::convertUtf8(inputValue, output); + char32_t outputValue = utf8::convertChar32(output); + EXPECT_EQ(inputValue, outputValue); +} +