@ -7,7 +7,7 @@
open ! IStd
open ! IStd
open OUnit2
open OUnit2
module T = J avaProfilerSamples . JNI . VISIBLE_FOR_TESTING_DO_NOT_USE_DIRECTLY
module T = J Procname . JNI . VISIBLE_FOR_TESTING_DO_NOT_USE_DIRECTLY
let mk_split ( pkg , typ ) = Typ . Name . Java . Split . make ? package : pkg typ
let mk_split ( pkg , typ ) = Typ . Name . Java . Split . make ? package : pkg typ
@ -100,7 +100,7 @@ let test_jni_parse_str_with_valid_input =
) ) ]
) ) ]
, Void ) ] )
, Void ) ] )
; ( " test_jni_parse_str_with_empty_method_signature "
; ( " test_jni_parse_str_with_empty_method_signature "
, J avaProfilerSamples . JNI . void_method_with_no_arguments
, J Procname . JNI . void_method_with_no_arguments
, T . [ Method ( [] , Void ) ] )
, T . [ Method ( [] , Void ) ] )
; ( " test_jni_parse_str_with_empty_input " , " " , [] ) ]
; ( " test_jni_parse_str_with_empty_input " , " " , [] ) ]
| > List . map ~ f : ( fun ( name , test_input , expected_output ) ->
| > List . map ~ f : ( fun ( name , test_input , expected_output ) ->
@ -174,7 +174,7 @@ let test_from_json_string_with_valid_input =
\ " methodOne \" , \" signature \" : \" %s \" , \" wat \" : \" \" },{ \" class \" : \" ddd.eee.Fff \" , \" boo \" : \
\ " methodOne \" , \" signature \" : \" %s \" , \" wat \" : \" \" },{ \" class \" : \" ddd.eee.Fff \" , \" boo \" : \
\ " \" , \" method \" : \" methodTwo \" , \" signature \" : \" (Ljava/lang/String;[IJ)[[C \" , \" wat \" : \
\ " \" , \" method \" : \" methodTwo \" , \" signature \" : \" (Ljava/lang/String;[IJ)[[C \" , \" wat \" : \
\ " \" }]}] "
\ " \" }]}] "
J avaProfilerSamples . JNI . void_method_with_no_arguments
J Procname . JNI . void_method_with_no_arguments
in
in
let expected2 =
let expected2 =
[ ( " label1 "
[ ( " label1 "
@ -264,7 +264,7 @@ let test_from_json_string_with_invalid_input =
, Printf . sprintf
, Printf . sprintf
" { \" whatever \" : {}, \" methods \" : [{ \" class \" : \" aaa.bbb.Ccc \" , \" boo \" : \" \" , \" method \" : \
" { \" whatever \" : {}, \" methods \" : [{ \" class \" : \" aaa.bbb.Ccc \" , \" boo \" : \" \" , \" method \" : \
\ " methodOne \" , \" signature \" : \" %s \" }], \" foo \" : {}} "
\ " methodOne \" , \" signature \" : \" %s \" }], \" foo \" : {}} "
J avaProfilerSamples . JNI . void_method_with_no_arguments
J Procname . JNI . void_method_with_no_arguments
, Yojson . Json_error
, Yojson . Json_error
" Line 1, bytes 0-33: \n Expected '[' but found '{ \" whatever \" : {}, \" methods \" : [{ \" cl' " )
" Line 1, bytes 0-33: \n Expected '[' but found '{ \" whatever \" : {}, \" methods \" : [{ \" cl' " )
; ( " test_from_json_string_3 "
; ( " test_from_json_string_3 "