Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/array2d
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_ARRAY2D__
#define __WLIB_ARRAY2D__

#include <wlib/stl/Array2D.h>

#endif

7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/array_heap
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_ARRAY_HEAP__
#define __WLIB_ARRAY_HEAP__

#include <wlib/stl/ArrayHeap.h>

#endif

7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/array_list
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_ARRAY_LIST__
#define __WLIB_ARRAY_LIST__

#include <wlib/stl/ArrayList.h>

#endif

19 changes: 19 additions & 0 deletions lib/wlib/include/wlib/bit_set
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#ifndef __WLIB_BIT_SET__
#define __WLIB_BIT_SET__

#include <wlib/stl/Bitset.h>

#endif
#ifndef __WLIB_BIT_SET__
#define __WLIB_BIT_SET__

#include <wlib/stl/Bitset.h>

#endif
#ifndef __WLIB_BIT_SET__
#define __WLIB_BIT_SET__

#include <wlib/stl/Bitset.h>

#endif

7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/comparator
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_COMPARATOR__
#define __WLIB_COMPARATOR__

#include <wlib/stl/Comparator.h>

#endif

9 changes: 9 additions & 0 deletions lib/wlib/include/wlib/dynamic_string
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ifndef __WLIB_DYNAMIC_STRING__
#define __WLIB_DYNAMIC_STRING__

// TODO Separate String.h into StaticString.h and DynamicString.h
// #include <wlib/strings/DynamicString.h>
#include <wlib/strings/String.h>

#endif

7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/equals
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_EQUALS__
#define __WLIB_EQUALS__

#include <wlib/stl/Equal.h>

#endif

7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/exception
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_EXCEPTION__
#define __WLIB_EXCEPTION__

#include <wlib/exceptions/Exceptions.h>

#endif

7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/hash
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_HASH__
#define __WLIB_HASH__

#include <wlib/stl/Hash.h>

#endif

7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/hash_map
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_HASH_MAP__
#define __WLIB_HASH_MAP__

#include <wlib/stl/HashMap.h>

#endif

7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/hash_set
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_HASH_SET__
#define __WLIB_HASH_SET__

#include <wlib/stl/HashSet.h>

#endif

7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/hash_table
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_HASH_TABLE__
#define __WLIB_HASH_TABLE__

#include <wlib/stl/HashTable.h>

#endif

7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/initializer_list
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_INITIALIZER_LIST__
#define __WLIB_INITIALIZER_LIST__

#include <wlib/stl/InitializerList.h>

#endif

7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/linked_list
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_LINKED_LIST__
#define __WLIB_LINKED_LIST__

#include <wlib/stl/LinkedList.h>

#endif

7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/math
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_MATH__
#define __WLIB_MATH__

#include <wlib/utility/Math.h>

#endif

8 changes: 8 additions & 0 deletions lib/wlib/include/wlib/memory
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifndef __WLIB_MEMORY__
#define __WLIB_MEMORY__

#include <wlib/unique_ptr>
#include <wlib/shared_ptr>

#endif

7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/open_map
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_OPEN_MAP__
#define __WLIB_OPEN_MAP__

#include <wlib/stl/OpenMap.h>

#endif

7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/open_set
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_OPEN_SET__
#define __WLIB_OPEN_SET__

#include <wlib/stl/OpenSet.h>

#endif

7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/open_table
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_OPEN_TABLE__
#define __WLIB_OPEN_TABLE__

#include <wlib/stl/OpenTable.h>

#endif

7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/pair
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_PAIR__
#define __WLIB_PAIR__

#include <wlib/stl/Pair.h>

#endif

7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/shared_ptr
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_SHARED_PTR__
#define __WLIB_SHARED_PTR__

#include <wlib/stl/SharedPtr.h>

#endif

7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/state_machine
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_STATEMACHINE__
#define __WLIB_STATEMACHINE__

#include <wlib/fsm/StateMachine.h>

#endif

9 changes: 9 additions & 0 deletions lib/wlib/include/wlib/static_string
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ifndef __WLIB_STATIC_STRING__
#define __WLIB_STATIC_STRING__

// TODO Separate String.h into StaticString.h and DynamicString.h
// #include <wlib/strings/StaticString.h>
#include <wlib/strings/String.h>

#endif

8 changes: 8 additions & 0 deletions lib/wlib/include/wlib/string
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifndef __WLIB_STRING__
#define __WLIB_STRING__

#include <wlib/static_string>
#include <wlib/dynamic_string>

#endif

7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/tree
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_TREE__
#define __WLIB_TREE__

#include <wlib/stl/RedBlackTree.h>

#endif

7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/tree_map
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_TREE_MAP__
#define __WLIB_TREE_MAP__

#include <wlib/stl/TreeMap.h>

#endif

7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/tree_set
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_TREE_SET__
#define __WLIB_TREE_SET__

#include <wlib/stl/TreeSet.h>

#endif

7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/tuple
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_TUPLE__
#define __WLIB_TUPLE__

#include <wlib/stl/Tuple.h>

#endif

7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/type_traits
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_TYPE_TRAITS__
#define __WLIB_TYPE_TRAITS__

#include <wlib/stl/TypeTraits.h>

#endif

7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/types
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_TYPES__
#define __WLIB_TYPES__

#include <wlib/Types.h>

#endif

7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/unique_ptr
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_UNIQUE_PTR__
#define __WLIB_UNIQUE_PTR__

#include <wlib/stl/UniquePtr.h>

#endif

9 changes: 9 additions & 0 deletions lib/wlib/include/wlib/utility
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ifndef __WLIB_UTILITY__
#define __WLIB_UTILITY__

#include <wlib/utility/Compare.h>
#include <wlib/utility/Tmp.h>
#include <wlib/utility/Utility.h>

#endif

7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/vector2d
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_VECTOR2D__
#define __WLIB_VECTOR2D__

#include <wlib/stl/Vector2D.h>

#endif

7 changes: 7 additions & 0 deletions lib/wlib/include/wlib/wlib
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __WLIB_WLIB__
#define __WLIB_WLIB__

#include <wlib/Wlib.h>

#endif

10 changes: 7 additions & 3 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Waddress -Warray-bounds -
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Winit-self -Wnon-virtual-dtor -Woverloaded-virtual")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wswitch -Wunreachable-code")

set(GTEST_INCLUDE_DIR ${gtest_SOURCE_DIR}/include)
set(WLIB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/lib/wlib)
set(GTEST_INCLUDE_DIR ${gtest_SOURCE_DIR}/include)
set(WLIB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/lib/wlib)
set(WLIB_INCLUDE_GENERIC ${CMAKE_SOURCE_DIR}/lib/wlib/include)

include_directories(${GTEST_INCLUDE_DIR})
include_directories(${WLIB_INCLUDE_DIR})
Expand All @@ -20,10 +21,13 @@ file(GLOB files
"fsm/*.cpp"
"memory/*.cpp"
"exceptions/*.cpp"
"utility/*.cpp")
"utility/*.cpp"
"includes/*.cpp")

add_executable(tests ${files})
target_link_libraries(tests gtest)
target_link_libraries(tests wlib)
target_include_directories(tests PUBLIC ${WLIB_INCLUDE_GENERIC})
add_dependencies(tests wlib)
add_dependencies(tests gtest)

40 changes: 40 additions & 0 deletions tests/includes/test_includes.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#include <wlib/array_heap>
#include <wlib/array_list>
#include <wlib/array2d>
#include <wlib/bit_set>
#include <wlib/comparator>
#include <wlib/dynamic_string>
#include <wlib/equals>
#include <wlib/exception>
#include <wlib/hash>
#include <wlib/hash_map>
#include <wlib/hash_set>
#include <wlib/hash_table>
#include <wlib/initializer_list>
#include <wlib/linked_list>
#include <wlib/math>
#include <wlib/memory>
#include <wlib/open_map>
#include <wlib/open_set>
#include <wlib/open_table>
#include <wlib/pair>
#include <wlib/shared_ptr>
#include <wlib/state_machine>
#include <wlib/static_string>
#include <wlib/string>
#include <wlib/tree>
#include <wlib/tree_map>
#include <wlib/tree_set>
#include <wlib/tuple>
#include <wlib/type_traits>
#include <wlib/types>
#include <wlib/unique_ptr>
#include <wlib/utility>
#include <wlib/vector2d>
#include <wlib/wlib>

void include_test() {
wlp::array_list<int> list;
list.push_back(1);
}