Skip to content

Commit 02de9be

Browse files
committed
Rename src/tests/test.h -> src/tests/app_test.h to avoid confusion with observable tests/test.h
1 parent 6836911 commit 02de9be

18 files changed

+24
-19
lines changed

cmake/FindTests.cmake

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1+
# Copyright (C) 2021 Igara Studio S.A.
12
# Copyright (C) 2001-2016 David Capello
23
# Find tests and add rules to compile them and run them
34

45
function(find_tests dir dependencies)
56
file(GLOB tests ${CMAKE_CURRENT_SOURCE_DIR}/${dir}/*_tests.cpp)
67
list(REMOVE_AT ARGV 0)
78

8-
# Add gtest include directory so we can #include <gtest/gtest.h> in tests source code
9-
include_directories(${CMAKE_SOURCE_DIR}/third_party/gtest/include)
10-
119
# See if the test is linked with "laf-os" library.
1210
list(FIND dependencies laf-os link_with_os)
1311
if(link_with_os)
@@ -28,6 +26,13 @@ function(find_tests dir dependencies)
2826

2927
target_link_libraries(${testname} gtest ${ARGV} ${PLATFORM_LIBS})
3028

29+
target_include_directories(${testname} PUBLIC
30+
# So we can include "tests/app_test.h"
31+
${CMAKE_SOURCE_DIR}/src
32+
# Add gtest include directory so we can #include <gtest/gtest.h>
33+
# in tests source code
34+
${CMAKE_SOURCE_DIR}/third_party/gtest/include)
35+
3136
if(extra_definitions)
3237
set_target_properties(${testname}
3338
PROPERTIES COMPILE_FLAGS ${extra_definitions})

src/app/cli/cli_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// This program is distributed under the terms of
66
// the End-User License Agreement for Aseprite.
77

8-
#include "tests/test.h"
8+
#include "tests/app_test.h"
99

1010
#include "app/cli/app_options.h"
1111
#include "app/cli/cli_processor.h"

src/app/cli/filter_layer_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// This program is distributed under the terms of
55
// the End-User License Agreement for Aseprite.
66

7-
#include "tests/test.h"
7+
#include "tests/app_test.h"
88

99
#include "app/cli/cli_processor.h"
1010
#include "doc/layer.h"

src/app/color_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// This program is distributed under the terms of
55
// the End-User License Agreement for Aseprite.
66

7-
#include "tests/test.h"
7+
#include "tests/app_test.h"
88

99
#include "app/color.h"
1010

src/app/context_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// This program is distributed under the terms of
55
// the End-User License Agreement for Aseprite.
66

7-
#include "tests/test.h"
7+
#include "tests/app_test.h"
88

99
#include "app/context.h"
1010
#include "app/doc.h"

src/app/doc_api_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// This program is distributed under the terms of
66
// the End-User License Agreement for Aseprite.
77

8-
#include "tests/test.h"
8+
#include "tests/app_test.h"
99

1010
#include "app/context.h"
1111
#include "app/doc.h"

src/app/doc_range_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// This program is distributed under the terms of
55
// the End-User License Agreement for Aseprite.
66

7-
#include "tests/test.h"
7+
#include "tests/app_test.h"
88

99
#include "app/context.h"
1010
#include "app/doc.h"

src/app/errno_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// This program is distributed under the terms of
55
// the End-User License Agreement for Aseprite.
66

7-
#include "tests/test.h"
7+
#include "tests/app_test.h"
88

99
#include <errno.h>
1010
#include "base/thread.h"

src/app/file/file_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// This program is distributed under the terms of
66
// the End-User License Agreement for Aseprite.
77

8-
#include "tests/test.h"
8+
#include "tests/app_test.h"
99

1010
#include "app/app.h"
1111
#include "app/context.h"

src/app/file/split_filename_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// This program is distributed under the terms of
55
// the End-User License Agreement for Aseprite.
66

7-
#include "tests/test.h"
7+
#include "tests/app_test.h"
88

99
#include "app/file/split_filename.h"
1010

src/app/filename_formatter_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// This program is distributed under the terms of
55
// the End-User License Agreement for Aseprite.
66

7-
#include "tests/test.h"
7+
#include "tests/app_test.h"
88

99
#include "app/filename_formatter.h"
1010

src/app/ini_file_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// This program is distributed under the terms of
55
// the End-User License Agreement for Aseprite.
66

7-
#include "tests/test.h"
7+
#include "tests/app_test.h"
88

99
#include "app/ini_file.h"
1010
#include "base/fs.h"

src/observable

File renamed without changes.

src/ui/accelerator_ui_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Read LICENSE.txt for more information.
66

77
#define TEST_GUI
8-
#include "tests/test.h"
8+
#include "tests/app_test.h"
99

1010
using namespace ui;
1111

src/ui/grid_ui_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Read LICENSE.txt for more information.
66

77
#define TEST_GUI
8-
#include "tests/test.h"
8+
#include "tests/app_test.h"
99
#include "gfx/rect_io.h"
1010
#include "gfx/size.h"
1111

src/undo

0 commit comments

Comments
 (0)