<commit_before>package zog

import (
	"fmt"
	"testing"
)

type executeTestCase struct {
	prog       string
	assertions []assert
}

func TestExecuteBasic(t *testing.T) {
	addr := uint16(0x100)
	memSize := uint16(0x1000)
	testCases := []executeTestCase{

		{"SCF : RR B", []assert{locA{B, 0x80}, flagA{F_C, false}}},
		{"LD B, 0x80 : RR B", []assert{locA{B, 0x40}, flagA{F_C, false}}},
		{"LD B, 0x01 : RR B", []assert{locA{B, 0x00}, flagA{F_C, true}}},

		{"LD A, 0xff : XOR A : LD HL, 0x1000 : INC HL", []assert{locA{A, 0x00}, flagA{F_Z, true}}},

		{"LD A, 0x00 : OR A", []assert{locA{A, 0x00}, flagA{F_Z, true}}},
		{"LD A, 0xff : OR A", []assert{locA{A, 0xff}, flagA{F_Z, false}}},
		{"LD A, 0xff : XOR A", []assert{locA{A, 0x00}, flagA{F_Z, true}}},<commit_msg>(unsuccessful) attempt to pin down zexall failure in tests<commit_after>package zog

import (
	"fmt"
	"testing"
)

type executeTestCase struct {
	prog       string
	assertions []assert
}

func TestExecuteBasic(t *testing.T) {
	addr := uint16(0x100)
	memSize := uint16(0x1000)
	testCases := []executeTestCase{

		{"SCF : LD HL, 0x4b18 : LD SP, 0x465e : ADC HL, SP : LD (0080h), SP : LD SP, 0x0100 : PUSH AF : POP DE", []assert{
			loc16A{HL, 0x9177},
			flagA{F_H, true},
			locA{E, 0x94},
		}},

		{"LD HL, 0xffff : LD SP, 0x0001 : ADC HL, SP", []assert{
			loc16A{HL, 0x0000},
			flagA{F_S, false},
			flagA{F_Z, true},
			flagA{F_H, true},
			flagA{F_PV, false},
			flagA{F_N, false},
			flagA{F_C, true},
		}},
		{"SCF : LD HL, 0x1234 : LD SP, 0x5678 : ADC HL, SP", []assert{loc16A{HL, 0x68ad}}},
		{"LD HL, 0x1234 : LD SP, 0x5678 : ADC HL, SP", []assert{loc16A{HL, 0x68ac}}},

		{"SCF : RR B", []assert{locA{B, 0x80}, flagA{F_C, false}}},
		{"LD B, 0x80 : RR B", []assert{locA{B, 0x40}, flagA{F_C, false}}},
		{"LD B, 0x01 : RR B", []assert{locA{B, 0x00}, flagA{F_C, true}}},

		{"LD A, 0xff : XOR A : LD HL, 0x1000 : INC HL", []assert{locA{A, 0x00}, flagA{F_Z, true}}},

		{"LD A, 0x00 : OR A", []assert{locA{A, 0x00}, flagA{F_Z, true}}},
		{"LD A, 0xff : OR A", []assert{locA{A, 0xff}, flagA{F_Z, false}}},
		{"LD A, 0xff : XOR A", []assert{locA{A, 0x00}, flagA{F_Z, true}}},
{'fraction_non_alphanumeric': 0.2096924510717614, 'fraction_numerical': 0.0782851817334576, 'mean_word_length': 4.148681055155875, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3047279', 'n_tokens_mistral': 1171, 'n_tokens_neox': 957, 'n_words': 255}