Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed eunit tests. Switched from mochinum to js_mochinum.

  • Loading branch information...
commit d388cb922cfe546d3d674cb894ec0372ad15209b 1 parent 8be23cb
@jonmeredith jonmeredith authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/js_mochijson2.erl
View
6 src/js_mochijson2.erl
@@ -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) ->
@@ -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">>).
Please sign in to comment.
Something went wrong with that request. Please try again.