int function1();\r
int function2();\r
\r
-#endif // FOLDER1_H
\ No newline at end of file
+#endif // FOLDER1_H\r
+++ /dev/null
-#include "gtest/gtest.h"\r
-extern "C" {\r
-#include "folder1.h"\r
-}\r
-\r
-TEST(function1_test, compare1)\r
-{\r
- ASSERT_EQ(function1(), 1) << "Values are equal function1 == 1";\r
-}\r
-\r
-TEST(function2_test, compare2)\r
-{\r
- ASSERT_EQ(function2(), 2) << "Values are equal function2 == 2";\r
-}\r
-\r
-folder1_inc = include_directories('')
-folder1_lib = static_library('folder1', 'folder1.c')
-folder1_dep = declare_dependency(link_with : folder1_lib, include_directories : folder1_inc)
-folder1_tst = executable('test1', 'folder1_test.cpp', dependencies : [gtest, folder1_dep])
-test('test 1', folder1_tst)
+folder1_inc = include_directories('.')
+
+folder1_lib = static_library('folder1', 'folder1.c', include_directories : folder1_inc)
+
+folder1_dep = declare_dependency(link_with: folder1_lib, include_directories : folder1_inc)
--- /dev/null
+#include "gtest/gtest.h"\r
+extern "C" {\r
+#include "folder1.h"\r
+}\r
+\r
+TEST(function1_test, compare1)\r
+{\r
+ ASSERT_EQ(function1(), 1) << "Values are equal function1 == 1";\r
+}\r
+\r
+TEST(function2_test, compare2)\r
+{\r
+ ASSERT_EQ(function2(), 2) << "Values are equal function2 == 2";\r
+}\r
+\r
--- /dev/null
+folder1_tst = executable('test1', 'folder1_test.cpp', dependencies : [gtest, folder1_dep])
+test('test 1', folder1_tst)
+++ /dev/null
-#include "gtest/gtest.h"\r
-extern "C" {\r
-#include "folder2.h"\r
-}\r
-\r
-TEST(function3_test, compare3)\r
-{\r
- ASSERT_EQ(function3(), 3) << "Values are equal function3 == 3";\r
-}\r
-folder2_inc = include_directories('')
-folder2_lib = static_library('folder2', 'folder2.c')
-folder2_dep = declare_dependency(link_with : folder2_lib, include_directories : folder2_inc, dependencies : folder1_dep)
-folder2_tst = executable('test2', 'folder2_test.cpp', dependencies : [gtest, folder2_dep])
-test('test 2', folder2_tst)
+folder2_inc = include_directories('.')
+
+folder2_lib = static_library('folder2', 'folder2.c', include_directories : folder2_inc)
+
+folder2_dep = declare_dependency(link_with: folder2_lib, include_directories : folder2_inc, dependencies : folder1_dep)
--- /dev/null
+#include "gtest/gtest.h"\r
+extern "C" {\r
+#include "folder2.h"\r
+}\r
+\r
+TEST(function3_test, compare3)\r
+{\r
+ ASSERT_EQ(function3(), 3) << "Values are equal function3 == 3";\r
+}\r
--- /dev/null
+folder2_tst = executable('test2', 'folder2_test.cpp',
+ dependencies : [gtest, folder2_dep])
+test('test 2', folder2_tst)
project('meson_test','cpp', 'c')
gtest = dependency('gtest', main : true, required : false)
subdir('folder1')
+subdir('folder1_test')
subdir('folder2')
+subdir('folder2_test')