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
3 changes: 2 additions & 1 deletion src/engine/internal/codebuilderfactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
#pragma once

#include "icodebuilderfactory.h"
#include "test_export.h"

namespace libscratchcpp
{

class CodeBuilderFactory : public ICodeBuilderFactory
class LIBSCRATCHCPP_TEST_EXPORT CodeBuilderFactory : public ICodeBuilderFactory
{
public:
static std::shared_ptr<CodeBuilderFactory> instance();
Expand Down
1 change: 1 addition & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ add_subdirectory(scratchconfiguration)
add_subdirectory(assets)
add_subdirectory(script)
add_subdirectory(extensions)
add_subdirectory(codegen)
add_subdirectory(engine)
add_subdirectory(clock)
add_subdirectory(timer)
Expand Down
66 changes: 66 additions & 0 deletions test/codegen/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
add_library(
codegen_test_functions SHARED
testfunctions.cpp
testfunctions.h
testmock.h
)

target_link_libraries(
codegen_test_functions
GTest::gtest_main
GTest::gmock_main
scratchcpp
scratchcpp_mocks
)

add_executable(
codegen_test
main.cpp
codebuilder_test.cpp
codegentestutils.cpp
codegentestutils.h
operators/equal_comparison_test.cpp
operators/greater_than_test.cpp
operators/less_than_test.cpp
operators/math/add_test.cpp
operators/math/subtract_test.cpp
operators/math/multiply_test.cpp
operators/math/divide_test.cpp
operators/math/random_test.cpp
operators/math/random_int_test.cpp
operators/math/mod_test.cpp
operators/math/abs_test.cpp
operators/math/round_test.cpp
operators/math/floor_test.cpp
operators/math/ceil_test.cpp
operators/math/sqrt_test.cpp
operators/math/sin_test.cpp
operators/math/cos_test.cpp
operators/math/tan_test.cpp
operators/math/asin_test.cpp
operators/math/acos_test.cpp
operators/math/atan_test.cpp
operators/math/ln_test.cpp
operators/math/log10_test.cpp
operators/math/exp_test.cpp
operators/math/exp10_test.cpp
operators/logic/and_test.cpp
operators/logic/or_test.cpp
operators/logic/not_test.cpp
operators/string/string_equal_case_sensitive_test.cpp
operators/string/string_equal_case_insensitive_test.cpp
operators/string/string_concat_test.cpp
operators/string/string_char_test.cpp
operators/string/string_length_test.cpp
)

target_link_libraries(
codegen_test
GTest::gtest_main
GTest::gmock_main
scratchcpp
scratchcpp_mocks
codegen_test_functions
)

gtest_discover_tests(codegen_test)
Loading
Loading