mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-02-04 14:34:59 +00:00
disk INITHELLO tests ...
This commit is contained in:
parent
31b87f67e4
commit
b3c1af9786
Binary file not shown.
Binary file not shown.
@ -14,6 +14,14 @@
|
||||
#define RESET_INPUT() test_common_setup()
|
||||
|
||||
#define TESTING_DISK "testvm1.dsk.gz"
|
||||
#define BLANK_DSK "blank.dsk.gz"
|
||||
#define BLANK_NIB "blank.nib.gz"
|
||||
#define REBOOT_TO_DOS() \
|
||||
do { \
|
||||
apple_ii_64k[0][TESTOUT_ADDR] = 0x00; \
|
||||
joy_button0 = 0xff; \
|
||||
cpu65_interrupt(ResetSig); \
|
||||
} while (0)
|
||||
|
||||
#ifdef HAVE_OPENSSL
|
||||
#include <openssl/sha.h>
|
||||
@ -21,6 +29,9 @@
|
||||
#error "these tests require OpenSSL libraries (SHA)"
|
||||
#endif
|
||||
|
||||
#define TYPE_TRIGGER_WATCHPT() \
|
||||
test_type_input("POKE7987,255:REM TRIGGER DEBUGGER\r")
|
||||
|
||||
static bool test_do_reboot = true;
|
||||
|
||||
static void testvm_setup(void *arg) {
|
||||
@ -133,9 +144,49 @@ TEST test_boot_disk_cputrace() {
|
||||
#endif
|
||||
|
||||
TEST test_boot_disk() {
|
||||
setup_boot_disk(TESTING_DISK);
|
||||
|
||||
BOOT_TO_DOS();
|
||||
PASS();
|
||||
}
|
||||
|
||||
TEST test_inithello_dsk() {
|
||||
|
||||
test_setup_boot_disk(BLANK_DSK, 0);
|
||||
BOOT_TO_DOS();
|
||||
|
||||
ASSERT(apple_ii_64k[0][WATCHPOINT_ADDR] != TEST_FINISHED);
|
||||
ASSERT(apple_ii_64k[0][TESTOUT_ADDR] == 0x00);
|
||||
|
||||
test_type_input("INIT HELLO\r");
|
||||
TYPE_TRIGGER_WATCHPT();
|
||||
|
||||
c_debugger_go();
|
||||
|
||||
ASSERT(apple_ii_64k[0][WATCHPOINT_ADDR] == TEST_FINISHED);
|
||||
ASSERT_SHA("10F15B516E4CF2FC5B1712951A6F9C3D90BF595C");
|
||||
|
||||
REBOOT_TO_DOS();
|
||||
c_eject_6(0);
|
||||
|
||||
PASS();
|
||||
}
|
||||
|
||||
TEST test_inithello_nib() {
|
||||
|
||||
test_setup_boot_disk(BLANK_NIB, 0);
|
||||
BOOT_TO_DOS();
|
||||
|
||||
ASSERT(apple_ii_64k[0][WATCHPOINT_ADDR] != TEST_FINISHED);
|
||||
|
||||
test_type_input("INIT HELLO\r");
|
||||
TYPE_TRIGGER_WATCHPT();
|
||||
|
||||
c_debugger_go();
|
||||
|
||||
ASSERT(apple_ii_64k[0][WATCHPOINT_ADDR] == TEST_FINISHED);
|
||||
ASSERT_SHA("10F15B516E4CF2FC5B1712951A6F9C3D90BF595C");
|
||||
|
||||
REBOOT_TO_DOS();
|
||||
c_eject_6(0);
|
||||
|
||||
PASS();
|
||||
}
|
||||
@ -522,9 +573,6 @@ TEST test_read_random() {
|
||||
" STA $1F43\r" \
|
||||
)
|
||||
|
||||
#define TYPE_TRIGGER_WATCHPT() \
|
||||
test_type_input("POKE7987,255:REM TRIGGER DEBUGGER\r")
|
||||
|
||||
TEST test_PAGE2_on(bool flag_80store, bool flag_hires) {
|
||||
BOOT_TO_DOS();
|
||||
|
||||
@ -3309,6 +3357,9 @@ GREATEST_SUITE(test_suite_vm) {
|
||||
|
||||
RUN_TESTp(test_boot_disk);
|
||||
|
||||
RUN_TESTp(test_inithello_dsk);
|
||||
RUN_TESTp(test_inithello_nib);
|
||||
|
||||
RUN_TESTp(test_read_keyboard);
|
||||
|
||||
RUN_TESTp(test_clear_keyboard);
|
||||
|
Loading…
x
Reference in New Issue
Block a user