Skip to content

Commit

Permalink
test: fix equal arguments order
Browse files Browse the repository at this point in the history
[core]
  • Loading branch information
MangelMaxime committed Jun 14, 2024
1 parent 4f34bac commit 3bf8492
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/Thoth.Json.Tests.JavaScript/Main.fs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type JavascriptTestRunner() =
override _.testCase = testCase
override _.ftestCase = ftestCase

override _.equal a b = Assert.AreEqual(b, a)
override _.equal expected actual = Assert.AreEqual(actual, expected)

override _.Encode = JavaScriptEncode()

Expand Down
3 changes: 2 additions & 1 deletion tests/Thoth.Json.Tests.Newtonsoft/Main.fs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type NewtonsoftTestRunner() =
override _.testCase = testCase
override _.ftestCase = ftestCase

override _.equal actual expected = Expect.equal actual expected ""
override _.equal expected actual = Expect.equal actual expected ""

override _.Encode = NewtonsoftEncode()

Expand All @@ -45,5 +45,6 @@ let main args =
[
Decoders.tests runner
Encoders.tests runner

]
|> runTestsWithArgs defaultConfig args
2 changes: 1 addition & 1 deletion tests/Thoth.Json.Tests.Python/Main.fs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type PythonTestRunner() =
override _.testCase = testCase
override _.ftestCase = ftestCase

override _.equal a b = Expect.equal b a ""
override _.equal expected actual = Expect.equal actual expected ""

override _.Encode = PythonEncode()

Expand Down
2 changes: 1 addition & 1 deletion tests/Thoth.Json.Tests/Util.fs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type TestRunner<'Test, 'JsonValue>() =
abstract testList: (string -> 'Test list -> 'Test) with get
abstract testCase: (string -> (unit -> unit) -> 'Test) with get
abstract ftestCase: (string -> (unit -> unit) -> 'Test) with get
abstract equal<'a when 'a: equality> : actual: 'a -> expected: 'a -> unit
abstract equal<'a when 'a: equality> : expected: 'a -> actual: 'a -> unit
abstract Encode: IEncode with get
abstract Decode: IDecode<'JsonValue> with get
abstract EncoderHelpers: IEncoderHelpers<'JsonValue> with get
Expand Down

0 comments on commit 3bf8492

Please sign in to comment.