@@ -1640,15 +1640,13 @@ defmodule Spitfire.CharPropertyTest do
16401640 { :ok , spitfire_ast } ->
16411641 msg =
16421642 if @ ci do
1643- % {
1643+ JSON . encode! ( % {
16441644 type: :mismatch ,
16451645 context: context ,
16461646 code: code ,
16471647 elixir: inspect ( elixir_ast , pretty: true ) ,
16481648 spitfire: inspect ( spitfire_ast , pretty: true )
1649- }
1650- |> :json . encode ( )
1651- |> IO . iodata_to_binary ( )
1649+ } )
16521650 else
16531651 """
16541652 AST mismatch in context #{ context } for code: #{ inspect ( code ) }
@@ -1666,14 +1664,12 @@ defmodule Spitfire.CharPropertyTest do
16661664 { :error , _spitfire_ast , _errors } ->
16671665 msg =
16681666 if @ ci do
1669- % {
1667+ JSON . encode! ( % {
16701668 type: :spitfire_error ,
16711669 context: context ,
16721670 code: code ,
16731671 elixir: inspect ( elixir_ast , pretty: true )
1674- }
1675- |> :json . encode ( )
1676- |> IO . iodata_to_binary ( )
1672+ } )
16771673 else
16781674 """
16791675 Spitfire returned error when elixir succeeded in context #{ context } for code: #{ inspect ( code ) }
@@ -1688,14 +1684,12 @@ defmodule Spitfire.CharPropertyTest do
16881684 { :error , :no_fuel_remaining } ->
16891685 msg =
16901686 if @ ci do
1691- % {
1687+ JSON . encode! ( % {
16921688 type: :spitfire_fuel ,
16931689 context: context ,
16941690 code: code ,
16951691 elixir: inspect ( elixir_ast , pretty: true )
1696- }
1697- |> :json . encode ( )
1698- |> IO . iodata_to_binary ( )
1692+ } )
16991693 else
17001694 """
17011695 Spitfire ran out of fuel in context #{ context } for code: #{ inspect ( code ) }
@@ -1710,14 +1704,12 @@ defmodule Spitfire.CharPropertyTest do
17101704 :crashed ->
17111705 msg =
17121706 if @ ci do
1713- % {
1707+ JSON . encode! ( % {
17141708 type: :spitfire_crash ,
17151709 context: context ,
17161710 code: code ,
17171711 elixir: inspect ( elixir_ast , pretty: true )
1718- }
1719- |> :json . encode ( )
1720- |> IO . iodata_to_binary ( )
1712+ } )
17211713 else
17221714 """
17231715 Spitfire crashed when elixir succeeded in context #{ context } for code: #{ inspect ( code ) }
0 commit comments