<commit_before>﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using static JAGBETests.RomTests.Helpers;

namespace JAGBETests.RomTests.mooneye
{
    [TestClass]
    [TestCategory("mooneye-gb_hwtests/acceptance")]
    public class AcceptanceTests
    {
        internal const string BasePath = "mooneye-gb_hwtests/acceptance/";

        private const string GenericSuccessSha = "ct/pSMvekPxIlT/NLHziuq1NDmhtjOC6zt2GF3aDBrs=";

        [TestClass]
        [TestCategory("mooneye-gb_hwtests/acceptance/bits")]
        public class Bits
        {
            private const string Path = BasePath + "bits/";

            [TestMethod]
            public void Mem_oam() => TestDisplayOut(Path + "mem_oam.gb", GenericSuccessSha, true);

            [TestMethod]
            public void Reg_f() => TestDisplayOut(Path + "reg_f.gb", "e5ZHp7lmvW48r7yPFAFCwB/wgr2708QEWeCsBOeH4KQ=", true);

            [TestMethod]
            public void Unused_hwio_GS() =>
                TestDisplayOut(Path + "unused_hwio-GS.gb", GenericSuccessSha, true);
        }

        [TestClass]
        [TestCategory("mooneye-gb_hwtests/acceptance/interrupts")]
        public class Interrupts
        {
            private const string Path = BasePath + "interrupts/";

            [TestMethod]
            public void Ie_push() => TestDisplayOut(Path + "ie_push.gb", GenericSuccessSha, true);
        }

        [TestClass]
        [TestCategory("mooneye-gb_hwtests/acceptance/ppu")]
        public class Gpu
        {
            private const string Path = BasePath + "ppu/";

            [TestMethod]
            public void Hblank_ly_scx_timing_GS() => TestDisplayOut(Path + "hblank_ly_scx_timing-GS.gb",
                "", false, "TU1eDJ+cy2fluCXe82j6uUVe84ddw17jtIegBv2CF3c=");

            [TestMethod]
            public void Intr_1_2_timing_GS() => TestDisplayOut(Path + "intr_1_2_timing-GS.gb",
                "7+un8n9KHlQeS17RVMhoQPgkIwkz3cWjIj2wIwDEHSE=", false, "9yxMVnNYfDxTjtmy4+8zssA9VIW66dbixlbG7UcJjOc=");

            [TestMethod]
            public void Intr_2_0_timing() => TestDisplayOut(Path + "intr_2_0_timing.gb",
                "", false, "MeDHaYlde0VoGrnrtdn0IECGMNxjXyDEu1mNClFK6kI=");

            [TestMethod]
            public void Intr_2_mode0_timing() => TestDisplayOut(Path + "intr_2_mode0_timing.gb",
                "", false, "lKuqaMKca8Qe9Mel+V6x6BtykqCSq57I8UukDYnP4V8=");

            [TestMethod]
            public void Intr_2_mode0_timing_sprites() => TestDisplayOut(Path + "intr_2_mode0_timing_sprites.gb",
                "", false, "JfQ1L++qDC8gWKj/sZrt51IzZquxxOmc3D/OPVZD2Ww=");

            [TestMethod]
            public void Intr_2_mode3_timing() => TestDisplayOut(Path + "intr_2_mode3_timing.gb",
                "", false, "S3+KCOG6gYRMpgjYiRCLQTruimouOuG3nfF3kmbwYDQ=");

            [TestMethod]
            public void Intr_2_oam_ok_timing() => TestDisplayOut(Path + "intr_2_oam_ok_timing.gb",
                "", false, "CKw2u6LgamT5nEIwMh6AFSzBIBs6ivL3Liqs8i21RCk=");

            [TestMethod]
            public void Lcdon_timing_dmgABCXmgbS() => TestDisplayOut(Path + "lcdon_timing-dmgABCXmgbS.gb",
                "", false, "jQLJk2H/WflkWVAhZ7KLyy9FvRpCLGld/PVGRW+QwVE=");

            [TestMethod]
            public void Lcdon_write_timing_GS() => TestDisplayOut(Path + "lcdon_write_timing-GS.gb",
                "", false, "bHTymavOwRDq1rc3KhRtD0sns8pp0B70PSlp8ms9eEA=");

            [TestMethod]
            public void Stat_irq_blocking() => TestDisplayOut(Path + "stat_irq_blocking.gb",
                GenericSuccessSha, true, "jdbPrSP9VfYmciq/OTBRLs3IHxppU6Qqrx/LxiJS+aw=");

            [TestMethod]
            public void Vblank_stat_intr_GS() => TestDisplayOut(Path + "vblank_stat_intr-GS.gb",
                "XAo3aFzglcyC+bPnKvD3W/Q12qExk2ICtktNEl9TIXE=", false, "Kj5h/BhF8WIWM5OLOauNYziiYLeQ7FPRL8kBLgTEoqg=");
        }

        [TestMethod]
        public void Add_sp_e_timing() => TestDisplayOut(BasePath + "add_sp_e_timing.gb",
            "AF0bKMH5fWBBpulG3afxT26PawXvJcurFwZfRTFMyTE=", true);

        [TestMethod]
        public void Boot_hwio_dmgABCXmgb() => TestDisplayOut(BasePath + "boot_hwio-dmgABCXmgb.gb",
                GenericSuccessSha, false, "ENFHl86MMZbEQYluddLwwHZCaKb1tSDmRjWr8Dtc9Uc=");

        [TestMethod]
        public void Boot_regs_dmgABCX() =><commit_msg>Add the `gpu/stat_lyc_onoff` test<commit_after>﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using static JAGBETests.RomTests.Helpers;

namespace JAGBETests.RomTests.mooneye
{
    [TestClass]
    [TestCategory("mooneye-gb_hwtests/acceptance")]
    public class AcceptanceTests
    {
        internal const string BasePath = "mooneye-gb_hwtests/acceptance/";

        private const string GenericSuccessSha = "ct/pSMvekPxIlT/NLHziuq1NDmhtjOC6zt2GF3aDBrs=";

        [TestClass]
        [TestCategory("mooneye-gb_hwtests/acceptance/bits")]
        public class Bits
        {
            private const string Path = BasePath + "bits/";

            [TestMethod]
            public void Mem_oam() => TestDisplayOut(Path + "mem_oam.gb", GenericSuccessSha, true);

            [TestMethod]
            public void Reg_f() => TestDisplayOut(Path + "reg_f.gb", "e5ZHp7lmvW48r7yPFAFCwB/wgr2708QEWeCsBOeH4KQ=", true);

            [TestMethod]
            public void Unused_hwio_GS() =>
                TestDisplayOut(Path + "unused_hwio-GS.gb", GenericSuccessSha, true);
        }

        [TestClass]
        [TestCategory("mooneye-gb_hwtests/acceptance/interrupts")]
        public class Interrupts
        {
            private const string Path = BasePath + "interrupts/";

            [TestMethod]
            public void Ie_push() => TestDisplayOut(Path + "ie_push.gb", GenericSuccessSha, true);
        }

        [TestClass]
        [TestCategory("mooneye-gb_hwtests/acceptance/ppu")]
        public class Gpu
        {
            private const string Path = BasePath + "ppu/";

            [TestMethod]
            public void Hblank_ly_scx_timing_GS() => TestDisplayOut(Path + "hblank_ly_scx_timing-GS.gb",
                "", false, "TU1eDJ+cy2fluCXe82j6uUVe84ddw17jtIegBv2CF3c=");

            [TestMethod]
            public void Intr_1_2_timing_GS() => TestDisplayOut(Path + "intr_1_2_timing-GS.gb",
                "7+un8n9KHlQeS17RVMhoQPgkIwkz3cWjIj2wIwDEHSE=", false, "9yxMVnNYfDxTjtmy4+8zssA9VIW66dbixlbG7UcJjOc=");

            [TestMethod]
            public void Intr_2_0_timing() => TestDisplayOut(Path + "intr_2_0_timing.gb",
                "", false, "MeDHaYlde0VoGrnrtdn0IECGMNxjXyDEu1mNClFK6kI=");

            [TestMethod]
            public void Intr_2_mode0_timing() => TestDisplayOut(Path + "intr_2_mode0_timing.gb",
                "", false, "lKuqaMKca8Qe9Mel+V6x6BtykqCSq57I8UukDYnP4V8=");

            [TestMethod]
            public void Intr_2_mode0_timing_sprites() => TestDisplayOut(Path + "intr_2_mode0_timing_sprites.gb",
                "", false, "JfQ1L++qDC8gWKj/sZrt51IzZquxxOmc3D/OPVZD2Ww=");

            [TestMethod]
            public void Intr_2_mode3_timing() => TestDisplayOut(Path + "intr_2_mode3_timing.gb",
                "", false, "S3+KCOG6gYRMpgjYiRCLQTruimouOuG3nfF3kmbwYDQ=");

            [TestMethod]
            public void Intr_2_oam_ok_timing() => TestDisplayOut(Path + "intr_2_oam_ok_timing.gb",
                "", false, "CKw2u6LgamT5nEIwMh6AFSzBIBs6ivL3Liqs8i21RCk=");

            [TestMethod]
            public void Lcdon_timing_dmgABCXmgbS() => TestDisplayOut(Path + "lcdon_timing-dmgABCXmgbS.gb",
                "", false, "jQLJk2H/WflkWVAhZ7KLyy9FvRpCLGld/PVGRW+QwVE=");

            [TestMethod]
            public void Lcdon_write_timing_GS() => TestDisplayOut(Path + "lcdon_write_timing-GS.gb",
                "", false, "bHTymavOwRDq1rc3KhRtD0sns8pp0B70PSlp8ms9eEA=");

            [TestMethod]
            public void Stat_irq_blocking() => TestDisplayOut(Path + "stat_irq_blocking.gb",
                GenericSuccessSha, true, "jdbPrSP9VfYmciq/OTBRLs3IHxppU6Qqrx/LxiJS+aw=");

            [TestMethod]
            public void StatLycOnoff() => TestDisplayOut(Path + "stat_lyc_onoff.gb", "", false, "L6c488ziTNv00GDnJiCBT/6C4E1Y8jryXjTWVxHDplc=");

            [TestMethod]
            public void Vblank_stat_intr_GS() => TestDisplayOut(Path + "vblank_stat_intr-GS.gb",
                "XAo3aFzglcyC+bPnKvD3W/Q12qExk2ICtktNEl9TIXE=", false, "Kj5h/BhF8WIWM5OLOauNYziiYLeQ7FPRL8kBLgTEoqg=");
        }

        [TestMethod]
        public void Add_sp_e_timing() => TestDisplayOut(BasePath + "add_sp_e_timing.gb",
            "AF0bKMH5fWBBpulG3afxT26PawXvJcurFwZfRTFMyTE=", true);

        [TestMethod]
        public void Boot_hwio_dmgABCXmgb() => TestDisplayOut(BasePath + "boot_hwio-dmgABCXmgb.gb",
                GenericSuccessSha, false, "ENFHl86MMZbEQYluddLwwHZCaKb1tSDmRjWr8Dtc9Uc=");

        [TestMethod]
        public void Boot_regs_dmgABCX() =>
{'fraction_non_alphanumeric': 0.10611004838528187, 'fraction_numerical': 0.03015640823675031, 'mean_word_length': 2.777305567360816, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 40, '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': '5312439', 'n_tokens_mistral': 3575, 'n_tokens_neox': 3404, 'n_words': 409}