@@ -57,6 +57,13 @@ static void test_wraprecs_hashmap() {
57
57
found_wraprec = nr_php_user_instrument_wraprec_hashmap_get (func_name , NULL );
58
58
tlib_pass_if_ptr_equal ("getting valid global function" , wraprec , found_wraprec );
59
59
60
+ wraprec = nr_php_user_instrument_wraprec_hashmap_add (NR_PSTR (FUNCTION_NAME ),
61
+ & is_new_wraprec );
62
+ tlib_pass_if_not_null ("adding valid global function one more time" , wraprec );
63
+ tlib_pass_if_false ("adding valid global function one more time" , is_new_wraprec ,
64
+ "expected false for is_new_wraprec" );
65
+ tlib_pass_if_ptr_equal ("getting valid global function one more time" , wraprec , found_wraprec );
66
+
60
67
found_wraprec = nr_php_user_instrument_wraprec_hashmap_get (func_name , scope_name );
61
68
tlib_pass_if_null ("getting global function with scope" , found_wraprec );
62
69
@@ -69,6 +76,13 @@ static void test_wraprecs_hashmap() {
69
76
found_wraprec = nr_php_user_instrument_wraprec_hashmap_get (method_name , scope_name );
70
77
tlib_pass_if_ptr_equal ("getting scoped method" , wraprec , found_wraprec );
71
78
79
+ wraprec = nr_php_user_instrument_wraprec_hashmap_add (NR_PSTR (SCOPED_METHOD_NAME ),
80
+ & is_new_wraprec );
81
+ tlib_pass_if_not_null ("adding valid scoped method one more time" , wraprec );
82
+ tlib_pass_if_false ("adding valid scoped method one more time" , is_new_wraprec ,
83
+ "expected false for is_new_wraprec" );
84
+ tlib_pass_if_ptr_equal ("getting valid scoped method one more time" , wraprec , found_wraprec );
85
+
72
86
found_wraprec = nr_php_user_instrument_wraprec_hashmap_get (NULL , scope_name );
73
87
tlib_pass_if_null ("getting scoped method without method name" , found_wraprec );
74
88
0 commit comments