Browse Source

Rename sandbox and tests dirs

Panagiotis Christopoulos Charitos 4 years ago
parent
commit
c7fbea1d75
53 changed files with 62 additions and 63 deletions
  1. 2 2
      CMakeLists.txt
  2. 3 0
      Sandbox/CMakeLists.txt
  3. 0 0
      Sandbox/Main.cpp
  4. 0 0
      Sandbox/config.xml
  5. 10 0
      Tests/CMakeLists.txt
  6. 0 0
      Tests/Data/Dir.ankizip
  7. 0 0
      Tests/Data/Dir/a.txt
  8. 0 0
      Tests/Data/Dir/subdir0/hello.txt
  9. 0 0
      Tests/Data/Dir/subdir1/subdir2/file.txt
  10. 1 1
      Tests/Framework/Framework.cpp
  11. 0 0
      Tests/Framework/Framework.h
  12. 1 1
      Tests/Gr/ClassGpuAllocator.cpp
  13. 1 1
      Tests/Gr/Gr.cpp
  14. 0 0
      Tests/Gr/RtTypes.h
  15. 1 1
      Tests/Gr/StackGpuAllocator.cpp
  16. 1 1
      Tests/Main.cpp
  17. 1 1
      Tests/Math/Math.cpp
  18. 2 2
      Tests/Renderer/TileAllocator.cpp
  19. 1 1
      Tests/Resource/AsyncLoader.cpp
  20. 4 4
      Tests/Resource/ResourceFilesystem.cpp
  21. 1 1
      Tests/Resource/ResourceManager.cpp
  22. 1 1
      Tests/Scene/Octree.cpp
  23. 1 1
      Tests/Script/LuaBinder.cpp
  24. 1 1
      Tests/ShaderCompiler/ShaderProgramCompiler.cpp
  25. 1 1
      Tests/ShaderCompiler/ShaderProgramParser.cpp
  26. 1 1
      Tests/Ui/Ui.cpp
  27. 2 2
      Tests/Util/Allocator.cpp
  28. 1 1
      Tests/Util/Atomic.cpp
  29. 1 1
      Tests/Util/BitSet.cpp
  30. 1 1
      Tests/Util/DynamicArray.cpp
  31. 1 1
      Tests/Util/Filesystem.cpp
  32. 1 1
      Tests/Util/Foo.cpp
  33. 0 0
      Tests/Util/Foo.h
  34. 2 2
      Tests/Util/HashMap.cpp
  35. 1 1
      Tests/Util/Hierarchy.cpp
  36. 1 1
      Tests/Util/HighRezTimer.cpp
  37. 1 1
      Tests/Util/INotify.cpp
  38. 2 2
      Tests/Util/List.cpp
  39. 2 2
      Tests/Util/Memory.cpp
  40. 1 1
      Tests/Util/Process.cpp
  41. 2 2
      Tests/Util/Serializer.cpp
  42. 0 0
      Tests/Util/SerializerTest.h
  43. 0 0
      Tests/Util/SerializerTest.xml
  44. 1 1
      Tests/Util/SparseArray.cpp
  45. 1 1
      Tests/Util/String.cpp
  46. 2 2
      Tests/Util/StringList.cpp
  47. 1 1
      Tests/Util/Thread.cpp
  48. 1 1
      Tests/Util/ThreadHive.cpp
  49. 1 1
      Tests/Util/Tracer.cpp
  50. 0 3
      sandbox/CMakeLists.txt
  51. 0 11
      tests/CMakeLists.txt
  52. 1 1
      tools/count_lines.sh
  53. 1 1
      tools/format_source.sh

+ 2 - 2
CMakeLists.txt

@@ -401,7 +401,7 @@ target_link_libraries(anki ${THIRD_PARTY_LIBS})
 # AnKi extra                                                                   #
 ################################################################################
 if(ANKI_BUILD_TESTS)
-	add_subdirectory(tests)
+	add_subdirectory(Tests)
 endif()
 
 if(ANKI_BUILD_TOOLS)
@@ -409,7 +409,7 @@ if(ANKI_BUILD_TOOLS)
 endif()
 
 if(ANKI_BUILD_SANDBOX)
-	add_subdirectory(sandbox)
+	add_subdirectory(Sandbox)
 endif()
 
 if(ANKI_BUILD_SAMPLES)

+ 3 - 0
Sandbox/CMakeLists.txt

@@ -0,0 +1,3 @@
+add_executable(Sandbox Main.cpp)
+target_link_libraries(Sandbox anki)
+installExecutable(Sandbox)

+ 0 - 0
sandbox/Main.cpp → Sandbox/Main.cpp


+ 0 - 0
sandbox/config.xml → Sandbox/config.xml


+ 10 - 0
Tests/CMakeLists.txt

@@ -0,0 +1,10 @@
+file(GLOB_RECURSE TESTS_SOURCES *.cpp)
+file(GLOB_RECURSE TESTS_HEADERS *.h)
+
+include_directories("..")
+
+add_executable(Tests ${TESTS_SOURCES} ${TESTS_HEADERS})
+target_compile_definitions(Tests PRIVATE -DANKI_SOURCE_FILE)
+target_link_libraries(Tests anki)
+
+installExecutable(Tests)

+ 0 - 0
tests/data/dir.ankizip → Tests/Data/Dir.ankizip


+ 0 - 0
tests/data/dir/a.txt → Tests/Data/Dir/a.txt


+ 0 - 0
tests/data/dir/subdir0/hello.txt → Tests/Data/Dir/subdir0/hello.txt


+ 0 - 0
tests/data/dir/subdir1/subdir2/file.txt → Tests/Data/Dir/subdir1/subdir2/file.txt


+ 1 - 1
tests/framework/Framework.cpp → Tests/Framework/Framework.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include "tests/framework/Framework.h"
+#include <Tests/Framework/Framework.h>
 #include <iostream>
 #include <cstring>
 #include <malloc.h>

+ 0 - 0
tests/framework/Framework.h → Tests/Framework/Framework.h


+ 1 - 1
tests/gr/ClassGpuAllocator.cpp → Tests/Gr/ClassGpuAllocator.cpp

@@ -4,7 +4,7 @@
 // http://www.anki3d.org/LICENSE
 
 #include <anki/gr/utils/ClassGpuAllocator.h>
-#include <tests/framework/Framework.h>
+#include <Tests/Framework/Framework.h>
 #include <random>
 #include <algorithm>
 

+ 1 - 1
tests/gr/Gr.cpp → Tests/Gr/Gr.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include <tests/framework/Framework.h>
+#include <Tests/Framework/Framework.h>
 #include <anki/Gr.h>
 #include <anki/core/NativeWindow.h>
 #include <anki/core/ConfigSet.h>

+ 0 - 0
tests/gr/RtTypes.h → Tests/Gr/RtTypes.h


+ 1 - 1
tests/gr/StackGpuAllocator.cpp → Tests/Gr/StackGpuAllocator.cpp

@@ -5,7 +5,7 @@
 
 #include <anki/gr/utils/StackGpuAllocator.h>
 #include <anki/util/ThreadHive.h>
-#include <tests/framework/Framework.h>
+#include <Tests/Framework/Framework.h>
 #include <algorithm>
 
 using namespace anki;

+ 1 - 1
tests/Main.cpp → Tests/Main.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include "tests/framework/Framework.h"
+#include <Tests/Framework/Framework.h>
 #include "anki/util/Filesystem.h"
 
 using namespace anki;

+ 1 - 1
tests/math/Math.cpp → Tests/Math/Math.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include "tests/framework/Framework.h"
+#include <Tests/Framework/Framework.h>
 #include "anki/Math.h"
 
 using namespace anki;

+ 2 - 2
tests/renderer/TileAllocator.cpp → Tests/Renderer/TileAllocator.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include <tests/framework/Framework.h>
+#include <Tests/Framework/Framework.h>
 #include <anki/renderer/TileAllocator.h>
 
 namespace anki
@@ -71,4 +71,4 @@ ANKI_TEST(Renderer, TileAllocator)
 	}
 }
 
-} // end namespace anki
+} // end namespace anki

+ 1 - 1
tests/resource/AsyncLoader.cpp → Tests/Resource/AsyncLoader.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include <tests/framework/Framework.h>
+#include <Tests/Framework/Framework.h>
 #include <anki/resource/AsyncLoader.h>
 #include <anki/util/HighRezTimer.h>
 #include <anki/util/Atomic.h>

+ 4 - 4
tests/resource/ResourceFilesystem.cpp → Tests/Resource/ResourceFilesystem.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include "tests/framework/Framework.h"
+#include <Tests/Framework/Framework.h>
 #include "anki/resource/ResourceFilesystem.h"
 
 namespace anki
@@ -11,13 +11,13 @@ namespace anki
 
 ANKI_TEST(Resource, ResourceFilesystem)
 {
-	printf("Test requires the data dir\n");
+	printf("Test requires the Data dir\n");
 
 	HeapAllocator<U8> alloc(allocAligned, nullptr);
 	ResourceFilesystem fs(alloc);
 
 	{
-		ANKI_TEST_EXPECT_NO_ERR(fs.addNewPath("data/dir/../dir/"));
+		ANKI_TEST_EXPECT_NO_ERR(fs.addNewPath("Tests/Data/Dir/../Dir/"));
 		ResourceFilePtr file;
 		ANKI_TEST_EXPECT_NO_ERR(fs.openFile("subdir0/hello.txt", file));
 		StringAuto txt(alloc);
@@ -26,7 +26,7 @@ ANKI_TEST(Resource, ResourceFilesystem)
 	}
 
 	{
-		ANKI_TEST_EXPECT_NO_ERR(fs.addNewPath("./data/dir.ankizip"));
+		ANKI_TEST_EXPECT_NO_ERR(fs.addNewPath("./Tests/Data/Dir.ankizip"));
 		ResourceFilePtr file;
 		ANKI_TEST_EXPECT_NO_ERR(fs.openFile("subdir0/hello.txt", file));
 		StringAuto txt(alloc);

+ 1 - 1
tests/resource/ResourceManager.cpp → Tests/Resource/ResourceManager.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include "tests/framework/Framework.h"
+#include <Tests/Framework/Framework.h>
 #include "anki/resource/DummyResource.h"
 #include "anki/resource/ResourceManager.h"
 #include "anki/core/ConfigSet.h"

+ 1 - 1
tests/scene/Octree.cpp → Tests/Scene/Octree.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include <tests/framework/Framework.h>
+#include <Tests/Framework/Framework.h>
 #include <anki/scene/Octree.h>
 
 namespace anki

+ 1 - 1
tests/script/LuaBinder.cpp → Tests/Script/LuaBinder.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include <tests/framework/Framework.h>
+#include <Tests/Framework/Framework.h>
 #include <anki/Script.h>
 #include <anki/Math.h>
 

+ 1 - 1
tests/shader_compiler/ShaderProgramCompiler.cpp → Tests/ShaderCompiler/ShaderProgramCompiler.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include <tests/framework/Framework.h>
+#include <Tests/Framework/Framework.h>
 #include <anki/shader_compiler/ShaderProgramCompiler.h>
 #include <anki/util/ThreadHive.h>
 

+ 1 - 1
tests/shader_compiler/ShaderProgramParser.cpp → Tests/ShaderCompiler/ShaderProgramParser.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include <tests/framework/Framework.h>
+#include <Tests/Framework/Framework.h>
 #include <anki/shader_compiler/ShaderProgramParser.h>
 
 ANKI_TEST(ShaderCompiler, ShaderCompilerParser)

+ 1 - 1
tests/ui/Ui.cpp → Tests/Ui/Ui.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include <tests/framework/Framework.h>
+#include <Tests/Framework/Framework.h>
 #include <anki/core/ConfigSet.h>
 #include <anki/util/HighRezTimer.h>
 #include <anki/Ui.h>

+ 2 - 2
tests/util/Allocator.cpp → Tests/Util/Allocator.cpp

@@ -3,8 +3,8 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include "tests/framework/Framework.h"
-#include "tests/util/Foo.h"
+#include <Tests/Framework/Framework.h>
+#include <Tests/Util/Foo.h>
 #include "anki/util/Allocator.h"
 #include <string>
 #include <iostream>

+ 1 - 1
tests/util/Atomic.cpp → Tests/Util/Atomic.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include <tests/framework/Framework.h>
+#include <Tests/Framework/Framework.h>
 #include <anki/util/Atomic.h>
 
 ANKI_TEST(Util, Atomic)

+ 1 - 1
tests/util/BitSet.cpp → Tests/Util/BitSet.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include <tests/framework/Framework.h>
+#include <Tests/Framework/Framework.h>
 #include <anki/util/BitSet.h>
 #include <bitset>
 

+ 1 - 1
tests/util/DynamicArray.cpp → Tests/Util/DynamicArray.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include <tests/framework/Framework.h>
+#include <Tests/Framework/Framework.h>
 #include <anki/util/DynamicArray.h>
 #include <vector>
 #include <ctime>

+ 1 - 1
tests/util/Filesystem.cpp → Tests/Util/Filesystem.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include "tests/framework/Framework.h"
+#include <Tests/Framework/Framework.h>
 #include "anki/util/Filesystem.h"
 #include "anki/util/File.h"
 

+ 1 - 1
tests/util/Foo.cpp → Tests/Util/Foo.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include "tests/util/Foo.h"
+#include <Tests/Util/Foo.h>
 
 int Foo::constructorCallCount = 0;
 int Foo::destructorCallCount = 0;

+ 0 - 0
tests/util/Foo.h → Tests/Util/Foo.h


+ 2 - 2
tests/util/HashMap.cpp → Tests/Util/HashMap.cpp

@@ -3,8 +3,8 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include "tests/framework/Framework.h"
-#include "tests/util/Foo.h"
+#include <Tests/Framework/Framework.h>
+#include <Tests/Util/Foo.h>
 #include "anki/util/HashMap.h"
 #include "anki/util/DynamicArray.h"
 #include "anki/util/HighRezTimer.h"

+ 1 - 1
tests/util/Hierarchy.cpp → Tests/Util/Hierarchy.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include "tests/framework/Framework.h"
+#include <Tests/Framework/Framework.h>
 #include "anki/util/Hierarchy.h"
 
 using namespace anki;

+ 1 - 1
tests/util/HighRezTimer.cpp → Tests/Util/HighRezTimer.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include <tests/framework/Framework.h>
+#include <Tests/Framework/Framework.h>
 #include <anki/util/HighRezTimer.h>
 #include <chrono>
 #include <thread>

+ 1 - 1
tests/util/INotify.cpp → Tests/Util/INotify.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include <tests/framework/Framework.h>
+#include <Tests/Framework/Framework.h>
 #include <anki/util/INotify.h>
 #include <anki/util/Filesystem.h>
 

+ 2 - 2
tests/util/List.cpp → Tests/Util/List.cpp

@@ -3,8 +3,8 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include "tests/framework/Framework.h"
-#include "tests/util/Foo.h"
+#include <Tests/Framework/Framework.h>
+#include <Tests/Util/Foo.h>
 #include "anki/util/List.h"
 #include "anki/util/HighRezTimer.h"
 #include <list>

+ 2 - 2
tests/util/Memory.cpp → Tests/Util/Memory.cpp

@@ -3,8 +3,8 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include "tests/framework/Framework.h"
-#include "tests/util/Foo.h"
+#include <Tests/Framework/Framework.h>
+#include <Tests/Util/Foo.h>
 #include "anki/util/Memory.h"
 #include "anki/util/ThreadPool.h"
 #include <type_traits>

+ 1 - 1
tests/util/Process.cpp → Tests/Util/Process.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include <tests/framework/Framework.h>
+#include <Tests/Framework/Framework.h>
 #include <anki/util/Process.h>
 #include <anki/util/File.h>
 #include <anki/util/HighRezTimer.h>

+ 2 - 2
tests/util/Serializer.cpp → Tests/Util/Serializer.cpp

@@ -3,9 +3,9 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include <tests/framework/Framework.h>
+#include <Tests/Framework/Framework.h>
 #include <anki/util/Serializer.h>
-#include <tests/util/SerializerTest.h>
+#include <Tests/Util/SerializerTest.h>
 
 ANKI_TEST(Util, BinarySerializer)
 {

+ 0 - 0
tests/util/SerializerTest.h → Tests/Util/SerializerTest.h


+ 0 - 0
tests/util/SerializerTest.xml → Tests/Util/SerializerTest.xml


+ 1 - 1
tests/util/SparseArray.cpp → Tests/Util/SparseArray.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include <tests/framework/Framework.h>
+#include <Tests/Framework/Framework.h>
 #include <anki/util/SparseArray.h>
 #include <anki/util/HighRezTimer.h>
 #include <unordered_map>

+ 1 - 1
tests/util/String.cpp → Tests/Util/String.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include "tests/framework/Framework.h"
+#include <Tests/Framework/Framework.h>
 #include "anki/util/String.h"
 #include <string>
 

+ 2 - 2
tests/util/StringList.cpp → Tests/Util/StringList.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include "tests/framework/Framework.h"
+#include <Tests/Framework/Framework.h>
 #include "anki/util/StringList.h"
 
 namespace anki
@@ -39,4 +39,4 @@ ANKI_TEST(Util, StringList)
 	}
 }
 
-} // end namespace anki
+} // end namespace anki

+ 1 - 1
tests/util/Thread.cpp → Tests/Util/Thread.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include "tests/framework/Framework.h"
+#include <Tests/Framework/Framework.h>
 #include "anki/util/Thread.h"
 #include "anki/util/StdTypes.h"
 #include "anki/util/HighRezTimer.h"

+ 1 - 1
tests/util/ThreadHive.cpp → Tests/Util/ThreadHive.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include <tests/framework/Framework.h>
+#include <Tests/Framework/Framework.h>
 #include <anki/util/ThreadHive.h>
 #include <anki/util/HighRezTimer.h>
 #include <anki/util/System.h>

+ 1 - 1
tests/util/Tracer.cpp → Tests/Util/Tracer.cpp

@@ -3,7 +3,7 @@
 // Code licensed under the BSD License.
 // http://www.anki3d.org/LICENSE
 
-#include <tests/framework/Framework.h>
+#include <Tests/Framework/Framework.h>
 #include <anki/util/Tracer.h>
 #include <anki/core/CoreTracer.h>
 #include <anki/util/HighRezTimer.h>

+ 0 - 3
sandbox/CMakeLists.txt

@@ -1,3 +0,0 @@
-add_executable(sandbox Main.cpp)
-target_link_libraries(sandbox anki)
-installExecutable(sandbox)

+ 0 - 11
tests/CMakeLists.txt

@@ -1,11 +0,0 @@
-file(GLOB_RECURSE TESTS_SOURCES *.cpp)
-file(GLOB_RECURSE TESTS_HEADERS *.h)
-
-include_directories("..")
-
-add_executable(anki_tests ${TESTS_SOURCES} ${TESTS_HEADERS})
-target_compile_definitions(anki_tests PRIVATE -DANKI_SOURCE_FILE)
-target_link_libraries(anki_tests anki)
-
-installExecutable(anki_tests)
-install(TARGETS anki_tests DESTINATION "${CMAKE_INSTALL_PREFIX}/tests")

+ 1 - 1
tools/count_lines.sh

@@ -1 +1 @@
-wc -l `find ./anki ./tests ./sandbox ./tools ./samples -name '*.h' -o -name '*.hpp' -o -name '*.c' -o -name '*.cpp' -o -name '*.glsl' -o -name '*.py' -o -name '*.ankiprog' -o -name '*.xml' `
+wc -l `find ./anki ./Tests ./Sandbox ./tools ./samples -name '*.h' -o -name '*.hpp' -o -name '*.c' -o -name '*.cpp' -o -name '*.glsl' -o -name '*.py' -o -name '*.ankiprog' -o -name '*.xml' `

+ 1 - 1
tools/format_source.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-files=(`find ./anki ./tests ./sandbox ./tools ./samples -name '*.h' -o -name '*.hpp' -o -name '*.c' -o -name '*.cpp' -o -name '*.glsl' -o -name '*.glslp' -o -name '*.ankiprog'`)
+files=(`find ./anki ./Tests ./Sandbox ./tools ./samples -name '*.h' -o -name '*.hpp' -o -name '*.c' -o -name '*.cpp' -o -name '*.glsl' -o -name '*.glslp' -o -name '*.ankiprog'`)
 
 filecount=${#files[@]}