Skip to content

Commit ed59615

Browse files
committed
Fix test relying on map ordering
1 parent 246fcab commit ed59615

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nx/test/nx/defn_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1995,15 +1995,15 @@ defmodule Nx.DefnTest do
19951995

19961996
defn while_mixed_return(a, b) do
19971997
while {a, b}, Nx.less(a, 10) do
1998-
%{a: a, b: b}
1998+
%{"a" => a, "b" => b}
19991999
end
20002000
end
20012001

20022002
test "raises on mixed return" do
20032003
expected_error =
20042004
[
20052005
"the do-block in while must return tensors with the same shape, type, and names as the initial arguments.",
2006-
"\n\n\e\\[32m\n<<<<< Body \\(do-block\\) <<<<<\n%\\{a: #Nx.Tensor<\n s32\n >, b: #Nx.Tensor<\n s32\n >\\}",
2006+
"\n\n\e\\[32m\n<<<<< Body \\(do-block\\) <<<<<\n%\\{\"a\" => #Nx.Tensor<\n s32\n >, \"b\" => #Nx.Tensor<\n s32\n >\\}",
20072007
"\n==========\n\e\\[31m\\{#Nx.Tensor<\n s32\n >, #Nx.Tensor<\n s32\n >\\}\n>>>>> Initial >>>>>\n\e\\[0m\n$"
20082008
]
20092009
|> IO.iodata_to_binary()

0 commit comments

Comments
 (0)