about summary refs log tree commit diff stats
path: root/baremetal
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-02-23 09:10:35 -0800
committerKartik K. Agaram <vc@akkartik.com>2021-02-23 09:10:35 -0800
commit8fbdfe22405da1a36509cf30417161494e1b5c1a (patch)
treeaf49cbed9d314cf61d3d78de111f69ccc79c7c61 /baremetal
parent7d34b82a59581dad6c81adc851461193d015695c (diff)
downloadmu-8fbdfe22405da1a36509cf30417161494e1b5c1a.tar.gz
7797
Diffstat (limited to 'baremetal')
-rw-r--r--baremetal/shell/trace.mu65
1 files changed, 17 insertions, 48 deletions
diff --git a/baremetal/shell/trace.mu b/baremetal/shell/trace.mu
index 6be6360b..372a2f19 100644
--- a/baremetal/shell/trace.mu
+++ b/baremetal/shell/trace.mu
@@ -188,10 +188,7 @@ fn test-render-trace-collapsed-by-default {
   var t-storage: trace
   var t/esi: (addr trace) <- address t-storage
   initialize-trace t, 0x10
-  var contents-storage: (stream byte 0x10)
-  var contents/ecx: (addr stream byte) <- address contents-storage
-  write contents, "data"
-  trace t, "l", contents
+  trace-text t, "l", "data"
   # setup: screen
   var screen-on-stack: screen
   var screen/edi: (addr screen) <- address screen-on-stack
@@ -223,13 +220,9 @@ fn test-render-trace-error-at-start {
   var t-storage: trace
   var t/esi: (addr trace) <- address t-storage
   initialize-trace t, 0x10
-  # line 1
+  #
   error t, "error"
-  # line 2
-  var contents-storage: (stream byte 0x10)
-  var contents/ecx: (addr stream byte) <- address contents-storage
-  write contents, "data"
-  trace t, "l", contents
+  trace-text t, "l", "data"
   # setup: screen
   var screen-on-stack: screen
   var screen/edi: (addr screen) <- address screen-on-stack
@@ -246,12 +239,8 @@ fn test-render-trace-error-at-end {
   var t-storage: trace
   var t/esi: (addr trace) <- address t-storage
   initialize-trace t, 0x10
-  # line 1
-  var contents-storage: (stream byte 0x10)
-  var contents/ecx: (addr stream byte) <- address contents-storage
-  write contents, "data"
-  trace t, "l", contents
-  # line 2
+  #
+  trace-text t, "l", "data"
   error t, "error"
   # setup: screen
   var screen-on-stack: screen
@@ -269,15 +258,10 @@ fn test-render-trace-error-in-the-middle {
   var t-storage: trace
   var t/esi: (addr trace) <- address t-storage
   initialize-trace t, 0x10
-  # line 1
-  var contents-storage: (stream byte 0x10)
-  var contents/ecx: (addr stream byte) <- address contents-storage
-  write contents, "data"
-  trace t, "l", contents
-  # line 2
+  #
+  trace-text t, "l", "line 1"
   error t, "error"
-  # line 3
-  trace t, "l", contents
+  trace-text t, "l", "line 3"
   # setup: screen
   var screen-on-stack: screen
   var screen/edi: (addr screen) <- address screen-on-stack
@@ -295,15 +279,10 @@ fn test-render-trace-cursor-in-single-line {
   var t-storage: trace
   var t/esi: (addr trace) <- address t-storage
   initialize-trace t, 0x10
-  # line 1
-  var contents-storage: (stream byte 0x10)
-  var contents/ecx: (addr stream byte) <- address contents-storage
-  write contents, "data"
-  trace t, "l", contents
-  # line 2
+  #
+  trace-text t, "l", "line 1"
   error t, "error"
-  # line 3
-  trace t, "l", contents
+  trace-text t, "l", "line 3"
   # setup: screen
   var screen-on-stack: screen
   var screen/edi: (addr screen) <- address screen-on-stack
@@ -360,15 +339,10 @@ fn test-cursor-down-and-up-within-trace {
   var t-storage: trace
   var t/esi: (addr trace) <- address t-storage
   initialize-trace t, 0x10
-  # line 1
-  var contents-storage: (stream byte 0x10)
-  var contents/ecx: (addr stream byte) <- address contents-storage
-  write contents, "data"
-  trace t, "l", contents
-  # line 2
+  #
+  trace-text t, "l", "line 1"
   error t, "error"
-  # line 3
-  trace t, "l", contents
+  trace-text t, "l", "line 3"
   # setup: screen
   var screen-on-stack: screen
   var screen/edi: (addr screen) <- address screen-on-stack
@@ -408,15 +382,10 @@ fn test-cursor-down-past-bottom-of-trace {
   var t-storage: trace
   var t/esi: (addr trace) <- address t-storage
   initialize-trace t, 0x10
-  # line 1
-  var contents-storage: (stream byte 0x10)
-  var contents/ecx: (addr stream byte) <- address contents-storage
-  write contents, "data"
-  trace t, "l", contents
-  # line 2
+  #
+  trace-text t, "l", "line 1"
   error t, "error"
-  # line 3
-  trace t, "l", contents
+  trace-text t, "l", "line 3"
   # setup: screen
   var screen-on-stack: screen
   var screen/edi: (addr screen) <- address screen-on-stack