Branch Coverage

lib/SPVM/Builder/src/spvm_api_basic_type.c
Criterion Covered Total %
branch 58 98 59.1


line true false branch
107 0 8497 if (class_var_index < 0) {
111 0 8497 if (class_var_index >= basic_type->class_vars_length) {
123 1172 0 if (basic_type->class_vars_length > 0) {
124 2789 28 for (int32_t class_var_index = 0; class_var_index < basic_type->class_vars_length; class_var_index++) {
127 1144 1645 if (strcmp(class_var_name_current, class_var_name) == 0) {
144 0 1377453 if (field_index < 0) {
148 0 1377453 if (field_index >= basic_type->fields_length) {
160 754809 0 if (basic_type->fields_length > 0) {
161 759335 30 for (int32_t field_index = 0; field_index < basic_type->fields_length; field_index++) {
164 754779 4556 if (strcmp(field_name_current, field_name) == 0) {
181 0 5593771 if (method_index < 0) {
185 0 5593771 if (method_index >= basic_type->methods_length) {
197 793446 0 if (basic_type->methods_length > 0) {
203 106 3129983 if (current_max_index < current_min_index) {
214 1580038 1549945 if (cmp_result > 0) {
217 756605 793340 else if (cmp_result < 0) {
242 0 123 if (anon_basic_type_index < 0) {
246 0 123 if (anon_basic_type_index >= basic_type->anon_basic_types_length) {
257 0 18 if (!(interface_basic_type->category == SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_INTERFACE)) {
261 0 18 if (!(basic_type->category == SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_CLASS || basic_type->category == SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_INTERFACE)) {
0 0 if (!(basic_type->category == SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_CLASS || basic_type->category == SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_INTERFACE)) {
265 18 18 for (int32_t interface_method_index = 0; interface_method_index < interface_basic_type->methods_length; interface_method_index++) {
268 162 18 for (int32_t method_index = 0; method_index < basic_type->methods_length; method_index++) {
273 0 162 if (method_compatibility == 0) {
284 162 0 if (dist_method->is_required && !method) {
0 162 if (dist_method->is_required && !method) {
285 0 0 if (!dist_method->is_class_method) {
290 162 0 if (method) {
291 0 162 if (method->is_class_method) {
292 0 0 if (!dist_method->is_class_method) {
297 0 162 if (!(method->required_args_length == dist_method->required_args_length)) {
301 0 162 if (!(method->args_length >= dist_method->args_length)) {
305 20 162 for (int32_t arg_index = 1; arg_index < dist_method->args_length; arg_index++) {
319 0 20 if (!assignability_for_method) {
338 0 162 if (!assignability_for_method_definition) {
353 50 132 if (SPVM_API_RUNTIME_is_any_object_type(runtime, dist_type_basic_type, dist_type_dimension, dist_type_flag)) {
354 50 0 if (SPVM_API_TYPE_is_object_type(runtime, src_type_basic_type, src_type_dimension, src_type_flag)) {
361 0 132 else if (SPVM_API_RUNTIME_is_any_object_array_type(runtime, dist_type_basic_type, dist_type_dimension, dist_type_flag)) {
362 0 0 if (SPVM_API_RUNTIME_is_object_array_type(runtime, src_type_basic_type, src_type_dimension, src_type_flag)) {
370 132 0 if (dist_type_dimension == src_type_dimension && dist_type_flag == src_type_flag) {
132 0 if (dist_type_dimension == src_type_dimension && dist_type_flag == src_type_flag) {
371 0 132 if (SPVM_API_BASIC_TYPE_is_class_type(runtime, dist_type_basic_type)) {
372 0 0 if (dist_type_basic_type->id == src_type_basic_type->id) {
380 132 0 if (dist_type_basic_type->id == src_type_basic_type->id) {
402 0 132 switch (basic_type_category) {
420 0 56 if (!(super_basic_type->category == SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_CLASS)) {
424 14 42 if (!(child_basic_type->category == SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_CLASS)) {
431 12 32 if (parent_basic_type) {
432 10 2 if (parent_basic_type->id == super_basic_type->id) {