@@ -541,6 +541,13 @@ defmodule Torque.PropertyTest do
541541 assert { :error , :malformed_proplist } = Torque . encode ( { [ { :a , :b , :c } ] } )
542542 end
543543
544+ # BEAM rejects non-finite floats (both arithmetic overflow and binary_to_term
545+ # validation), so this NIF code path is not reachable from Elixir.
546+ @ tag :skip
547+ test "non-finite float returns non_finite_float" do
548+ assert { :error , :non_finite_float } = Torque . encode ( :infinity )
549+ end
550+
544551 test "encode_to_iodata raises with unsupported_type message" do
545552 assert_raise ArgumentError , ~r/ unsupported_type/ , fn ->
546553 Torque . encode_to_iodata ( self ( ) )
@@ -589,17 +596,6 @@ defmodule Torque.PropertyTest do
589596 end
590597 end
591598
592- property "numeric-looking string keys work alongside integer array indexes" do
593- check all ( n <- integer ( 0 .. 100 ) ) do
594- # Object key that looks like an integer — should be treated as a string key
595- json = ~s( {"#{ n } ": "string_val"})
596- { :ok , doc } = Torque . parse ( json )
597- # Accessing "/N" on an object should still find the string key "N"
598- result = Torque . get ( doc , "/#{ n } " )
599- assert match? ( { :ok , _ } , result ) or match? ( { :error , :no_such_field } , result )
600- end
601- end
602-
603599 test "path without leading slash returns no_such_field" do
604600 { :ok , doc } = Torque . parse ( ~s( {"a":1}) )
605601 assert { :error , :no_such_field } = Torque . get ( doc , "a" )
0 commit comments