@@ -59,7 +59,7 @@ class DebuggerTests : DebuggerTestBase() {
5959 val results = mutableListOf<Triple <Int , Double , Debugger .SnapshotPolicy >>()
6060 for (policy in listOf (
6161 // Debugger.SnapshotPolicy.None(),
62- Debugger .SnapshotPolicy .Checkpointing (1 ),
62+ Debugger .SnapshotPolicy .Checkpointing (1U ),
6363 /* Debugger.SnapshotPolicy.Checkpointing(5),
6464 Debugger.SnapshotPolicy.Checkpointing(10),
6565 Debugger.SnapshotPolicy.Checkpointing(50),
@@ -96,7 +96,7 @@ class DebuggerTests : DebuggerTestBase() {
9696 // val connection = ProcessConnection(wdcliPath, getFile("blink.wasm").path, "--no-socket")
9797 val connection = ProcessConnection (wdcliPath, getFile(" /home/maarten/Documents/Projects/maarten-thesis-23-24/wardbg/src/test/resources/prime/prime-no-mem.wasm" ).path, " --no-socket" )
9898 val debugger = Debugger (connection)
99- debugger.setSnapshotPolicy(Debugger .SnapshotPolicy .Checkpointing (100 ))
99+ debugger.setSnapshotPolicy(Debugger .SnapshotPolicy .Checkpointing (100U ))
100100 debugger.pause()
101101 val count = debugger.checkpoints.size
102102 debugger.continueFor(1000 )
@@ -108,8 +108,8 @@ class DebuggerTests : DebuggerTestBase() {
108108 fun `Test snapshot policy serialization` () {
109109 assertEquals(" 00" , Debugger .SnapshotPolicy .None ().serialize())
110110 assertEquals(" 01" , Debugger .SnapshotPolicy .AtEveryInstruction ().serialize())
111- assertEquals(" 0205" , Debugger .SnapshotPolicy .Checkpointing (5 ).serialize())
112- assertEquals(" 02ff" , Debugger .SnapshotPolicy .Checkpointing (255 ).serialize())
111+ assertEquals(" 0205" , Debugger .SnapshotPolicy .Checkpointing (5U ).serialize())
112+ assertEquals(" 02ff" , Debugger .SnapshotPolicy .Checkpointing (255U ).serialize())
113113 }
114114
115115 @Test
@@ -139,7 +139,7 @@ class DebuggerTests : DebuggerTestBase() {
139139 xSorted.sort()
140140 for (n in xSorted) {
141141 runWithDebugger(wasmFile, emulator = false ) { debugger ->
142- debugger.setSnapshotPolicy(Debugger .SnapshotPolicy .Checkpointing (checkpointInterval))
142+ debugger.setSnapshotPolicy(Debugger .SnapshotPolicy .Checkpointing (checkpointInterval.toUInt() ))
143143 var time = 0L
144144 // val repeatCount = 50
145145 // val repeatCount = 5
@@ -184,10 +184,10 @@ class DebuggerTests : DebuggerTestBase() {
184184 fun `Test stepBack performance, min max average time`(stepSize: Int) {*/
185185 fun `Test stepBack performance` () {
186186 val fileWriter = File (" results.txt" ).bufferedWriter()
187- val results = mutableListOf<Pair <Triple <Int , Int , Int >, Triple <Long , Long , Double >>>()
187+ val results = mutableListOf<Pair <Triple <Int , Int , UInt >, Triple <Long , Long , Double >>>()
188188 // for (checkpointInterval in listOf(1, 2, 5, 10)) {
189189 // for (checkpointInterval in listOf(1, 5, 10, 50, 100)) {
190- for (checkpointInterval in listOf (5 , 10 , 50 , 100 )) {
190+ for (checkpointInterval in listOf (5U , 10U , 50U , 100U )) {
191191 for (stepSize in listOf (1 , 3 , 5 , 8 , 10 , 15 )) {
192192 // for (stepSize in listOf(5, 8, 10, 15)) {
193193 val n = 200
@@ -250,7 +250,7 @@ class DebuggerTests : DebuggerTestBase() {
250250 @Test
251251 fun `x` () {
252252 runWithDebugger(" prime/prime.wasm" , false ) {
253- it.setSnapshotPolicy(Debugger .SnapshotPolicy .Checkpointing (10 ))
253+ it.setSnapshotPolicy(Debugger .SnapshotPolicy .Checkpointing (10U ))
254254 it.continueFor(50 )
255255 }
256256 }
@@ -265,7 +265,7 @@ class DebuggerTests : DebuggerTestBase() {
265265 runWithDebugger(wasmFile, false ) {
266266 var t = 0
267267 val timings = mutableListOf<Pair <Int , Long >>()
268- it.setSnapshotPolicy(Debugger .SnapshotPolicy .Checkpointing (0xffffff ))
268+ it.setSnapshotPolicy(Debugger .SnapshotPolicy .Checkpointing (0xffffffU ))
269269 it.stepInto()
270270 it.checkpoints[it.checkpoints.size - 1 ] = null
271271 timings.add(Pair (t, timeElapsed {
@@ -312,7 +312,7 @@ class DebuggerTests : DebuggerTestBase() {
312312 val connection = ProcessConnection (wdcliPath, getFile(wasmFile).path, " --no-socket" )
313313 val binaryInfo = getBinaryInfo(config.symbolicWdcliPath, getFile(wasmFile).absolutePath)
314314 val debugger = MultiverseDebugger (connection, WasmBinary (File (wasmFile), binaryInfo.getOrThrow()), config.symbolicWdcliPath)
315- debugger.setSnapshotPolicy(Debugger .SnapshotPolicy .Checkpointing (10 ))
315+ debugger.setSnapshotPolicy(Debugger .SnapshotPolicy .Checkpointing (10U ))
316316 debugger.pause()
317317 // debugger.continueFor(5)
318318 debugger.step(5 )
0 commit comments