Skip to content

Commit e1afd90

Browse files
authored
Merge pull request #153 from scratchcpp/control_blocks_test
Add control blocks test
2 parents 1563f71 + 78f3706 commit e1afd90

File tree

4 files changed

+829
-5
lines changed

4 files changed

+829
-5
lines changed

src/blocks/controlblocks.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77

88
#include "controlblocks.h"
99

10-
namespace libscratchcpp
11-
{
10+
using namespace libscratchcpp;
1211

1312
std::string ControlBlocks::name() const
1413
{
@@ -197,5 +196,3 @@ unsigned int ControlBlocks::waitUntil(VirtualMachine *vm)
197196
}
198197
return 1;
199198
}
200-
201-
} // namespace libscratchcpp

src/blocks/controlblocks.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ class ControlBlocks : public IBlockSection
5454
static void compileWait(Compiler *compiler);
5555
static void compileWaitUntil(Compiler *compiler);
5656

57-
private:
5857
static unsigned int stopAll(VirtualMachine *vm);
5958
static unsigned int stopOtherScriptsInSprite(VirtualMachine *vm);
6059
static unsigned int startWait(VirtualMachine *vm);

test/blocks/CMakeLists.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,19 @@ target_link_libraries(
6161
)
6262

6363
gtest_discover_tests(event_blocks_test)
64+
65+
# control_blocks_test
66+
add_executable(
67+
control_blocks_test
68+
control_blocks_test.cpp
69+
)
70+
71+
target_link_libraries(
72+
control_blocks_test
73+
GTest::gtest_main
74+
GTest::gmock_main
75+
scratchcpp
76+
scratchcpp_mocks
77+
)
78+
79+
gtest_discover_tests(control_blocks_test)

0 commit comments

Comments
 (0)