Skip to content

Commit 334f4c8

Browse files
authored
Simple PPX expect test
1 parent 844e5b6 commit 334f4c8

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

_posts/2025-01-11-ImplementingaJITCompiledLanguagewithOCamlandLLVM.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,21 @@ end
9494

9595
{% endhighlight %}
9696

97+
The following is a simple test to drive the code shown above. This code will be improved further.
98+
99+
{% highlight ocaml %}
100+
101+
open Scanner
102+
type parsed_text = (int, string ) result
103+
[@@deriving show]
104+
105+
let%expect_test _=
106+
107+
let parsed_text = main "(1)" in
108+
Printf.printf "%s" (show_parsed_text parsed_text);
109+
[%expect {| (Ok 1) |}];
110+
111+
{% endhighlight %}
112+
113+
97114
> TODO

0 commit comments

Comments
 (0)