about summary refs log tree commit diff stats
path: root/baremetal/502test.mu
blob: af7a73ff3eb5e7241428484723d329a6e33a007b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# print msg to screen if a != b, otherwise print "."
fn check-ints-equal _a: int, b: int, msg: (addr array byte) {
  var a/eax: int <- copy _a
  compare a, b
  {
    break-if-=
    draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, msg, 3  # 3=cyan
    count-test-failure
    return
  }
  {
    break-if-!=
    draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, ".", 3  # 3=cyan
  }
}

fn test-check-ints-equal {
  check-ints-equal 0, 0, "abc"
}