Skip to content

Commit ff64d66

Browse files
committed
[FIX] : fis tests
1 parent 2002abf commit ff64d66

4 files changed

Lines changed: 13 additions & 8 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ enable_language(C CXX)
88
option(USE_TESTS "Enable tests" ON)
99
option(USE_VISUAL_TESTS "Enable visual tests" ON)
1010

11-
option(USE_DIRENT_FILESYSTEM "Enable the default filesystem with dirent" OFF)
12-
option(USE_STD_FILESYSTEM "Enable std::filesystem use for path and ImGuiFileDialog" ON)
11+
option(USE_DIRENT_FILESYSTEM "Enable the default filesystem with dirent" ON)
12+
option(USE_STD_FILESYSTEM "Enable std::filesystem use for path and ImGuiFileDialog" OFF)
1313
option(USE_BOOST_FILESYSTEM "Enable the demo of custom filesystem here with boost" OFF)
1414

1515
## some defines for debug mode (before 3rdparty.cmake)
@@ -223,8 +223,6 @@ target_link_libraries(${PROJECT} PRIVATE
223223
ImGuiFileDialog)
224224
endif()
225225

226-
set_target_properties(ImGuiFileDialog PROPERTIES FOLDER Lib)
227-
228226
target_include_directories(ImGuiFileDialog PRIVATE
229227
${CMAKE_CURRENT_SOURCE_DIR}
230228
)

cmake/glfw.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@ set(GLFW_INSTALL OFF CACHE BOOL "" FORCE)
66

77
add_subdirectory(${CMAKE_SOURCE_DIR}/3rdparty/glfw)
88

9-
set_target_properties(glfw PROPERTIES FOLDER 3rdparty) # Override standard 'GLFW3' subfolder
9+
set_target_properties(glfw PROPERTIES FOLDER 3rdparty/glfw) # Override standard 'GLFW3' subfolder
1010

1111
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
1212
#target_compile_options(glfw PRIVATE "-Wno-everything")
1313
else()
1414
target_compile_options(glfw PRIVATE "-Wno-everything")
1515
endif()
1616

17+
if (TARGET update_mappings)
18+
set_target_properties(update_mappings PROPERTIES FOLDER 3rdparty/glfw) # Override standard 'GLFW3' subfolder
19+
endif()
20+
1721
set(GLFW_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/3rdparty/glfw/include)
1822
set(GLFW_DEFINITIONS -DGLFW_INCLUDE_NONE)
1923
set(GLFW_LIBRARIES ${GLFW_LIBRARIES} glfw)

tests/ImGuiFileDialog/Test_FileManager.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
#include <cassert>
44

5-
#include <ImGuiFileDialog/ImGuiFileDialog.h>
5+
#include <ImGuiFileDialog/ImGuiFileDialog.cpp>
66

77
#include <imgui_internal.h>
88

9+
#include <filesystem>
10+
911
// specific
1012
#ifdef WIN32
1113
#include <direct.h> // _chdir
@@ -23,9 +25,10 @@ class TestFileManager {
2325
private:
2426
FileDialogInternal fd;
2527
std::set<std::string> arr;
26-
std::unique_ptr<IFileSystem> m_FileSystemPtr = nullptr;
28+
std::unique_ptr<IFileSystem> m_FileSystemPtr = std::make_unique<FileSystemDirent>();
2729

2830
private:
31+
2932
void m_compute_name_array() {
3033
for (const auto& file_ptr : fd.fileManager.m_FileList) {
3134
if (file_ptr) {

tests/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ int main(int argc, char** argv) {
2929
return Test_ImGuiFileDialog(argv[1]) ? 0 : 1;
3030
}
3131

32-
return Test_ImGuiFileDialog("Test_IGFD_Utils_NaturalCompare_5") ? 0 : 1;
32+
return Test_ImGuiFileDialog("Test_IGFD_FileManager_Filtering_asterisk_0") ? 0 : 1;
3333

3434
return 0;
3535
}

0 commit comments

Comments
 (0)