-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRenderRests.cs
More file actions
35 lines (28 loc) · 850 Bytes
/
Copy pathRenderRests.cs
File metadata and controls
35 lines (28 loc) · 850 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System.ComponentModel;
using System.Reflection;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Qkmaxware.Emulators.Gameboy.Hardware;
namespace Qkmaxware.Emulators.Gameboy.Test;
[TestClass]
public class RenderTests : GbTests {
[TestMethod]
public void TestDoesFlushBuffer() {
var gb = MakeGB(out var results);
// Read and validate cart
var name = "01-special";
var cart = ReadCart(name);
gb.LoadCartridge(cart);
// Run test
int lineNo = 0;
var flushed = false;
for (lineNo = 0; lineNo < 1000000; lineNo++) {
gb.Dispatch();
if (gb.GPU.HasBufferJustFlushed) {
flushed = true;
break;
}
}
Assert.AreNotEqual(0, lineNo);
Assert.AreEqual(true, flushed);
}
}