File tree Expand file tree Collapse file tree 3 files changed +22
-0
lines changed
Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -5,3 +5,5 @@ set(CMAKE_CXX_STANDARD 17)
55
66add_subdirectory (src)
77add_subdirectory (test )
8+
9+ enable_testing ()
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ $ mkdir build
3030$ cd build
3131$ cmake ..
3232$ make
33+ $ make test (optional step)
3334$ ./src/8bit <program.asm>
3435```
3536
Original file line number Diff line number Diff line change @@ -3,3 +3,22 @@ include_directories(include)
33
44add_executable (8bit-tests test_main.cpp core/BusTest.cpp core/FlagsRegisterTest.cpp core/StepCounterTest.cpp core/ProgramCounterTest.cpp core/ArithmeticLogicUnitTest.cpp core/EmulatorIntegrationTest.cpp core/AssemblerTest.cpp core/UtilsTest.cpp core/InstructionDecoderTest.cpp core/RandomAccessMemoryTest.cpp core/MemoryAddressRegisterTest.cpp core/TimeSourceTest.cpp core/ClockTest.cpp core/OutputRegisterTest.cpp core/InstructionRegisterTest.cpp core/GenericRegisterTest.cpp)
55target_link_libraries (8bit-tests 8bit-core)
6+
7+ enable_testing ()
8+
9+ add_test (ArithmeticLogicUnitTest 8bit-tests --source -file=*ArithmeticLogicUnitTest.cpp)
10+ add_test (AssemblerTest 8bit-tests --source -file=*AssemblerTest.cpp)
11+ add_test (BusTest 8bit-tests --source -file=*BusTest.cpp)
12+ add_test (ClockTest 8bit-tests --source -file=*ClockTest.cpp)
13+ add_test (EmulatorIntegrationTest 8bit-tests --source -file=*EmulatorIntegrationTest.cpp)
14+ add_test (FlagsRegisterTest 8bit-tests --source -file=*FlagsRegisterTest.cpp)
15+ add_test (GenericRegisterTest 8bit-tests --source -file=*GenericRegisterTest.cpp)
16+ add_test (InstructionDecoderTest 8bit-tests --source -file=*InstructionDecoderTest.cpp)
17+ add_test (InstructionRegisterTest 8bit-tests --source -file=*InstructionRegisterTest.cpp)
18+ add_test (MemoryAddressRegisterTest 8bit-tests --source -file=*MemoryAddressRegisterTest.cpp)
19+ add_test (OutputRegisterTest 8bit-tests --source -file=*OutputRegisterTest.cpp)
20+ add_test (ProgramCounterTest 8bit-tests --source -file=*ProgramCounterTest.cpp)
21+ add_test (RandomAccessMemoryTest 8bit-tests --source -file=*RandomAccessMemoryTest.cpp)
22+ add_test (StepCounterTest 8bit-tests --source -file=*StepCounterTest.cpp)
23+ add_test (TimeSourceTest 8bit-tests --source -file=*TimeSourceTest.cpp)
24+ add_test (UtilsTest 8bit-tests --source -file=*UtilsTest.cpp)
You can’t perform that action at this time.
0 commit comments