Skip to content

Commit

Permalink
remove unneeded namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
jchavarri committed Dec 15, 2024
1 parent 040b786 commit 4a362ff
Showing 1 changed file with 25 additions and 26 deletions.
51 changes: 25 additions & 26 deletions src/__tests__/Json_decode_test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module Test = struct
try
let _ = decoder value in
fail "should throw"
with Json.Of_json_error _ -> pass)
with Of_json_error _ -> pass)
end

let () =
Expand Down Expand Up @@ -78,8 +78,7 @@ let () =
let (_ : int) = int (Encode.int inf) in
fail "should throw"
with
| Json.Of_json_error (Json_error "Expected integer, got null")
->
| Of_json_error (Json_error "Expected integer, got null") ->
pass);

Test.throws int [ Bool; Float; String; Null; Array; Object; Char ]);
Expand Down Expand Up @@ -118,7 +117,7 @@ let () =
let (_ : char) = char (Encode.string "") in
fail "should throw"
with
| Json.Of_json_error
| Of_json_error
(Json_error "Expected a single-character string, got \"\"")
->
pass);
Expand All @@ -128,7 +127,7 @@ let () =
let (_ : char) = char (Encode.string "abc") in
fail "should throw"
with
| Json.Of_json_error
| Of_json_error
(Json_error
"Expected a single-character string, got \"abc\"")
->
Expand Down Expand Up @@ -209,7 +208,7 @@ let () =
in
fail "should throw"
with
| Json.Of_json_error
| Of_json_error
(Json_error "Expected boolean, got 1\n\tin array at index 0")
->
pass);
Expand Down Expand Up @@ -256,7 +255,7 @@ let () =
in
fail "should throw"
with
| Json.Of_json_error
| Of_json_error
(Json_error "Expected boolean, got 1\n\tin array at index 0")
->
pass);
Expand Down Expand Up @@ -288,7 +287,7 @@ let () =
in
fail "should throw"
with
| Json.Of_json_error
| Of_json_error
(Json_error
"Expected array of length 2, got array of length 1")
->
Expand All @@ -300,7 +299,7 @@ let () =
in
fail "should throw"
with
| Json.Of_json_error
| Of_json_error
(Json_error
"Expected array of length 2, got array of length 3")
->
Expand All @@ -312,7 +311,7 @@ let () =
in
fail "should throw"
with
| Json.Of_json_error
| Of_json_error
(Json_error "Expected number, got \"3\"\n\tin pair/tuple2")
->
pass);
Expand All @@ -323,7 +322,7 @@ let () =
in
fail "should throw"
with
| Json.Of_json_error
| Of_json_error
(Json_error "Expected string, got 4\n\tin pair/tuple2")
->
pass);
Expand Down Expand Up @@ -355,7 +354,7 @@ let () =
in
fail "should throw"
with
| Json.Of_json_error
| Of_json_error
(Json_error
"Expected array of length 2, got array of length 1")
->
Expand All @@ -367,7 +366,7 @@ let () =
in
fail "should throw"
with
| Json.Of_json_error
| Of_json_error
(Json_error
"Expected array of length 2, got array of length 3")
->
Expand All @@ -379,7 +378,7 @@ let () =
in
fail "should throw"
with
| Json.Of_json_error
| Of_json_error
(Json_error "Expected number, got \"3\"\n\tin pair/tuple2")
->
pass);
Expand All @@ -390,7 +389,7 @@ let () =
in
fail "should throw"
with
| Json.Of_json_error
| Of_json_error
(Json_error "Expected string, got 4\n\tin pair/tuple2")
->
pass);
Expand Down Expand Up @@ -426,7 +425,7 @@ let () =
in
fail "should throw"
with
| Json.Of_json_error
| Of_json_error
(Json_error
"Expected array of length 3, got array of length 1")
->
Expand All @@ -438,7 +437,7 @@ let () =
in
fail "should throw"
with
| Json.Of_json_error
| Of_json_error
(Json_error
"Expected array of length 3, got array of length 5")
->
Expand All @@ -450,7 +449,7 @@ let () =
in
fail "should throw"
with
| Json.Of_json_error
| Of_json_error
(Json_error "Expected number, got \"3\"\n\tin tuple3")
->
pass);
Expand All @@ -462,7 +461,7 @@ let () =
in
fail "should throw"
with
| Json.Of_json_error
| Of_json_error
(Json_error "Expected string, got 4\n\tin tuple3")
->
pass);
Expand Down Expand Up @@ -499,7 +498,7 @@ let () =
in
fail "should throw"
with
| Json.Of_json_error
| Of_json_error
(Json_error
"Expected array of length 4, got array of length 1")
->
Expand All @@ -512,7 +511,7 @@ let () =
in
fail "should throw"
with
| Json.Of_json_error
| Of_json_error
(Json_error
"Expected array of length 4, got array of length 6")
->
Expand All @@ -524,7 +523,7 @@ let () =
in
fail "should throw"
with
| Json.Of_json_error
| Of_json_error
(Json_error "Expected number, got \"3\"\n\tin tuple4")
->
pass);
Expand All @@ -536,7 +535,7 @@ let () =
in
fail "should throw"
with
| Json.Of_json_error
| Of_json_error
(Json_error "Expected string, got 4\n\tin tuple4")
->
pass);
Expand Down Expand Up @@ -591,7 +590,7 @@ let () =
in
fail "should throw"
with
| Json.Of_json_error
| Of_json_error
(Json_error
"Expected string, got null\n\tin object at key 'a'")
->
Expand Down Expand Up @@ -699,7 +698,7 @@ let () =
in
fail "should throw"
with
| Json.Of_json_error
| Of_json_error
(Json_error "Expected field 'y'\n\tat field 'a'")
->
pass);
Expand All @@ -715,7 +714,7 @@ let () =
in
fail "should throw"
with
| Json.Of_json_error
| Of_json_error
(Json_error
"Expected null\n\
\tat field 'y'\n\
Expand Down

0 comments on commit 4a362ff

Please sign in to comment.