Skip to content

Commit

Permalink
moon fmt
Browse files Browse the repository at this point in the history
Signed-off-by: Glenn Lewis <[email protected]>
  • Loading branch information
gmlewis committed Jul 19, 2024
1 parent ae0f7ce commit 2ca59ee
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
# moon build --target wasm-gc
# moon build --target wasm --output-wat

moon fmt
moon build --target wasm
moon test
6 changes: 3 additions & 3 deletions examples/arrays/arrays.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pub fn progressive_sum_ints() -> Int {
let s = @host.input_string()
let jv = try {
@json.parse(s)!
@json.parse!(s)
} catch {
e => {
@host.set_error("unable to parse input: \(e)")
Expand Down Expand Up @@ -34,7 +34,7 @@ pub fn progressive_sum_ints() -> Int {
pub fn progressive_sum_floats() -> Int {
let s = @host.input_string()
let jv = try {
@json.parse(s)!
@json.parse!(s)
} catch {
e => {
@host.set_error("unable to parse input: \(e)")
Expand Down Expand Up @@ -66,7 +66,7 @@ pub fn progressive_sum_floats() -> Int {
pub fn progressive_concat_strings() -> Int {
let s = @host.input_string()
let jv = try {
@json.parse(s)!
@json.parse!(s)
} catch {
e => {
@host.set_error("unable to parse input: \(e)")
Expand Down
2 changes: 1 addition & 1 deletion examples/count-vowels/count-vowels_wbtest.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ test "to_json" {
|> @jsonutil.stringify(spaces=0, newline=false)
let want =
#|{"count":1,"total":2,"vowels":"some string"}
@test.eq(got, want)!
@test.eq!(got, want)
}
6 changes: 3 additions & 3 deletions pdk/http/header.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ test "add" {
h.add("key2", "one")
h.add("key2", "two")
h.add("key2", "two")
@test.eq(h.0.get("nokey"), None)!
@test.eq(h.0.get("key1"), Some("one"))!
@test.eq(h.0.get("key2"), Some("one,two,two"))!
@test.eq!(h.0.get("nokey"), None)
@test.eq!(h.0.get("key1"), Some("one"))
@test.eq!(h.0.get("key2"), Some("one,two,two"))
}

0 comments on commit 2ca59ee

Please sign in to comment.