Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Commit

Permalink
refactor(tests): Move unit test files to unittests folder (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
xmnlab committed May 31, 2023
1 parent 12d71d4 commit 2349e1a
Show file tree
Hide file tree
Showing 19 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .makim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ groups:
${CLANG_EXTRA} \
${DEBUG_FLAGS} \
-fPIC \
"${TEST_DIR_PATH}/main-objects/${test_name}.cpp" \
"${TEST_DIR_PATH}/integration/${test_name}.cpp" \
${OBJECT_FILE} \
-o "${TMP_DIR}/main"
set +x
Expand Down Expand Up @@ -346,15 +346,15 @@ groups:
gen-all-examples:
help: Test all code generation for the example arx files
dependencies:
- target: tests.gen-object-examples
- target: tests.gen-ast-examples
- target: tests.gen-object-examples
- target: tests.gen-llvm-ir-examples

all:
help: Run sanitizer tests and code generation for examples
dependencies:
- target: tests.sanitizer
- target: tests.examples
- target: tests.gen-all-examples

lint:
help: Run linter tools
Expand Down
Binary file added c
Binary file not shown.
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ gmock_dep = dependency('gmock', required: get_option('dev'))

if get_option('dev').enabled()
deps += [gtest_dep, gmock_dep]
subdir('tests')
subdir('tests/unittests')
endif

clangtidy = find_program('clang-tidy', required: get_option('dev'))
Expand Down
2 changes: 1 addition & 1 deletion src/codegen/ast-to-object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ auto compile_object(TreeAST& tree_ast) -> int {
${DEBUG_FLAGS} \
-fPIC \
-std=c++20 \
"${TEST_DIR_PATH}/main-objects/${test_name}.cpp" \
"${TEST_DIR_PATH}/integration/${test_name}.cpp" \
${OBJECT_FILE} \
-o "${TMP_DIR}/main"
*/
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/meson.build → tests/unittests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ arx_build_lib = static_library(
install : false,
dependencies : deps)

TESTS_PATH = PROJECT_PATH + '/tests'
TESTS_PATH = PROJECT_PATH + '/tests/unittests'

test_suite = [
['error', files(TESTS_PATH + '/test-error.cpp')],
Expand All @@ -20,7 +20,7 @@ test_suite = [

foreach test_item : test_suite
test_name = test_item[0]
test_src_files = test_item[1] + files(PROJECT_PATH + '/tests/main.cpp')
test_src_files = test_item[1] + files(TESTS_PATH + '/main.cpp')

executable_name_suffix = test_name + '_tests'
test_executable = executable(
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 2349e1a

Please sign in to comment.