Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed eunit tests. Switched from mochinum to js_mochinum.
  • Loading branch information
Jon Meredith committed Apr 4, 2011
1 parent 8be23cb commit d388cb9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/js_mochijson2.erl
Expand Up @@ -99,9 +99,9 @@ json_encode(I, _State) when is_integer(I) andalso I >= -2147483648 andalso I =<
%% Anything outside of 32-bit integers should be encoded as a float
integer_to_list(I);
json_encode(I, _State) when is_integer(I) ->
mochinum:digits(float(I));
js_mochinum:digits(float(I));
json_encode(F, _State) when is_float(F) ->
mochinum:digits(F);
js_mochinum:digits(F);
json_encode(S, State) when is_binary(S); is_atom(S) ->
json_encode_string(S, State);
json_encode(Array, State) when is_list(Array) ->
Expand Down Expand Up @@ -628,7 +628,7 @@ encoder_utf8_test() ->
encode(<<1,"\321\202\320\265\321\201\321\202">>),

%% raw utf8 output (optional)
Enc = mochijson2:encoder([{utf8, true}]),
Enc = encoder([{utf8, true}]),
[34,"\\u0001",[209,130],[208,181],[209,129],[209,130],34] =
Enc(<<1,"\321\202\320\265\321\201\321\202">>).

Expand Down

0 comments on commit d388cb9

Please sign in to comment.