@@ -27,55 +27,50 @@ TEST_SUITE("EmulatorIntegrationTest") {
2727 " Emulator: no instructions loaded. Aborting" );
2828 }
2929
30- SUBCASE (" run () should complete nop_test.asm" ) {
30+ SUBCASE (" startSynchronous () should complete nop_test.asm" ) {
3131 emulator.load (" ../../programs/nop_test.asm" );
3232
33- emulator.run ();
34- emulator.waitUntilFinished ();
33+ emulator.startSynchronous ();
3534
3635 fakeit::Verify (Method (observerMock, valueUpdated).Using (0 )).Once (); // Reset before start
3736 fakeit::Verify (Method (observerMock, valueUpdated).Using (10 )).Once ();
3837 fakeit::VerifyNoOtherInvocations (observerMock);
3938 }
4039
41- SUBCASE (" run () should complete add_two_numbers.asm" ) {
40+ SUBCASE (" startSynchronous () should complete add_two_numbers.asm" ) {
4241 emulator.load (" ../../programs/add_two_numbers.asm" );
4342
44- emulator.run ();
45- emulator.waitUntilFinished ();
43+ emulator.startSynchronous ();
4644
4745 fakeit::Verify (Method (observerMock, valueUpdated).Using (0 )).Once (); // Reset before start
4846 fakeit::Verify (Method (observerMock, valueUpdated).Using (42 )).Once (); // 28+14
4947 fakeit::VerifyNoOtherInvocations (observerMock);
5048 }
5149
52- SUBCASE (" run () should complete subtract_two_numbers.asm" ) {
50+ SUBCASE (" startSynchronous () should complete subtract_two_numbers.asm" ) {
5351 emulator.load (" ../../programs/subtract_two_numbers.asm" );
5452
55- emulator.run ();
56- emulator.waitUntilFinished ();
53+ emulator.startSynchronous ();
5754
5855 fakeit::Verify (Method (observerMock, valueUpdated).Using (0 )).Once (); // Reset before start
5956 fakeit::Verify (Method (observerMock, valueUpdated).Using (18 )).Once (); // 30-12
6057 fakeit::VerifyNoOtherInvocations (observerMock);
6158 }
6259
63- SUBCASE (" run () should complete multiply_two_numbers.asm" ) {
60+ SUBCASE (" startSynchronous () should complete multiply_two_numbers.asm" ) {
6461 emulator.load (" ../../programs/multiply_two_numbers.asm" );
6562
66- emulator.run ();
67- emulator.waitUntilFinished ();
63+ emulator.startSynchronous ();
6864
6965 fakeit::Verify (Method (observerMock, valueUpdated).Using (0 )).Once (); // Reset before start
7066 fakeit::Verify (Method (observerMock, valueUpdated).Using (56 )).Once (); // 7*8
7167 fakeit::VerifyNoOtherInvocations (observerMock);
7268 }
7369
74- SUBCASE (" run () should complete count_0_255_stop.asm" ) {
70+ SUBCASE (" startSynchronous () should complete count_0_255_stop.asm" ) {
7571 emulator.load (" ../../programs/count_0_255_stop.asm" );
7672
77- emulator.run ();
78- emulator.waitUntilFinished ();
73+ emulator.startSynchronous ();
7974
8075 // Once for reset, and once when counting
8176 fakeit::Verify (Method (observerMock, valueUpdated).Using (0 )).Twice ();
@@ -87,11 +82,10 @@ TEST_SUITE("EmulatorIntegrationTest") {
8782 fakeit::VerifyNoOtherInvocations (observerMock);
8883 }
8984
90- SUBCASE (" run () should complete count_255_0_stop.asm" ) {
85+ SUBCASE (" startSynchronous () should complete count_255_0_stop.asm" ) {
9186 emulator.load (" ../../programs/count_255_0_stop.asm" );
9287
93- emulator.run ();
94- emulator.waitUntilFinished ();
88+ emulator.startSynchronous ();
9589
9690 // Once for reset, and once when counting
9791 fakeit::Verify (Method (observerMock, valueUpdated).Using (0 )).Twice ();
0 commit comments