diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2e897bc..fd76f33 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,12 +15,12 @@ jobs: strategy: matrix: - otp_version: [19.3.6, 20.3.8.26, 21.3.8.16, 22.3.4.2, 23.0.2] + otp_version: ['19.3.6', '20.3.8.26', '21.3.8.16', '22.3.4.2', '23.0.2', '24.0'] os: [ubuntu-18.04] steps: - uses: actions/checkout@v2 - - uses: gleam-lang/setup-erlang@v1.0.0 + - uses: gleam-lang/setup-erlang@v1.1.2 with: otp-version: ${{ matrix.otp_version }} diff --git a/src/jsx_to_json.erl b/src/jsx_to_json.erl index d20add6..5b877e2 100644 --- a/src/jsx_to_json.erl +++ b/src/jsx_to_json.erl @@ -325,7 +325,8 @@ encode_test_() -> }, {"1.0e23", ?_assert(encode(float, 1.0e23, #config{}) =:= ["1.0e23"])}, {"0.3", ?_assert(encode(float, 3.0/10.0, #config{}) =:= ["0.3"])}, - {"0.0001", ?_assert(encode(float, 0.0001, #config{}) =:= ["0.0001"])}, + {"0.0001", ?_assert(encode(float, 0.0001, #config{}) =:= ["0.0001"] + orelse encode(float, 0.0001, #config{}) =:= ["1.0e-4"])}, % OTP-24 {"0.00001", ?_assert(encode(float, 0.00001, #config{}) =:= ["1.0e-5"])}, {"0.00000001", ?_assert(encode(float, 0.00000001, #config{}) =:= ["1.0e-8"])}, {"1.0e-323", ?_assert(encode(float, 1.0e-323, #config{}) =:= ["1.0e-323"])},