[DEV] real remove of etk::FSNode ==> use now URI provider

This commit is contained in:
Edouard DUPIN 2018-09-13 23:09:52 +02:00
parent 996aa050d5
commit 0997e7a39d
11 changed files with 26 additions and 50 deletions

View File

@ -10,9 +10,7 @@
#include <elog/elog.hpp>
#include <echrono/Steady.hpp>
#include <echrono/Duration.hpp>
#include <etk/os/FSNode.hpp>
#include <etk/Allocator.hpp>
//#include <etk/os/FSNode.hpp>
static int32_t nbTimeInit = 0;

View File

@ -8,6 +8,7 @@
#include <etk/types.hpp>
#include <etk/Pair.hpp>
#include <etk/Vector.hpp>
#include <etk/algorithm.hpp>
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:

View File

@ -4,7 +4,10 @@
* @license MPL v2.0 (see license file)
*/
#pragma once
//#include <etk/Stream.hpp>
#include <etk/types.hpp>
extern "C" {
#include <math.h>
}
namespace etk {
inline float cos(float _value) {

View File

@ -9,7 +9,6 @@
#include <etk/types.hpp>
#include <etk/debug.hpp>
#include <elog/elog.hpp>
#include <etk/os/FSNode.hpp>
#include <etk/typeInfo.hpp>
#include <etk/Allocator.hpp>
#include <etk/theme/theme.hpp>
@ -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();
}

View File

@ -5,7 +5,6 @@
*/
#include <etk/os/FSNodeRight.hpp>
#include <etk/stdTools.hpp>
#include <etk/typeInfo.hpp>
#include <etk/fs/Permissions.hpp>

View File

@ -5,7 +5,7 @@
*/
#include <etk/tool.hpp>
#include <etk/os/FSNode.hpp>
#include <etk/String.hpp>
extern "C" {
#include <time.h>
#include <math.h>

View File

@ -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',

View File

@ -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',

View File

@ -1,29 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2011, Edouard DUPIN, all right reserved
*
* @license MPL v2.0 (see license file)
*/
#include <etest/etest.hpp>
#define NAME "Archive"
#include <etk/archive/Archive.hpp>
#include <test-debug/debug.hpp>
#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

View File

View File

@ -9,7 +9,7 @@
#include <test-debug/debug.hpp>
#include <etest/etest.hpp>
#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);
}
}
}
}
*/
TEST(TestUTF8, simple) {
char32_t inputValue = U'é';
char output[7];
u32char::convertUtf8(inputValue, output);
char32_t outputValue = utf8::convertChar32(output);
EXPECT_EQ(inputValue, outputValue);
}