From 49226a88e7b1545d230351e8c63b1131af572e9f Mon Sep 17 00:00:00 2001 From: Mohamed Ishad Date: Mon, 9 Oct 2023 17:30:31 +0530 Subject: [PATCH] Fix testcases --- .../oneof_field_service_pb.bal | 38 +++++++++---------- .../helloWorldWithReservedNames_pb.bal | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/tooling-tests/src/test/resources/test-src/generated-sources/tool_test_data_type_11/oneof_field_service_pb.bal b/tooling-tests/src/test/resources/test-src/generated-sources/tool_test_data_type_11/oneof_field_service_pb.bal index 2b5143c..0840efb 100644 --- a/tooling-tests/src/test/resources/test-src/generated-sources/tool_test_data_type_11/oneof_field_service_pb.bal +++ b/tooling-tests/src/test/resources/test-src/generated-sources/tool_test_data_type_11/oneof_field_service_pb.bal @@ -166,23 +166,23 @@ public type Request1 record {| isolated function isValidRequest1(Request1 r) returns boolean { int otherCount = 0; - if !(r?.age is ()) { + if r?.age !is () { otherCount += 1; } - if !(r?.address is ()) { + if r?.address !is () { otherCount += 1; } - if !(r?.married is ()) { + if r?.married !is () { otherCount += 1; } int nameCount = 0; - if !(r?.first_name is ()) { + if r?.first_name !is () { nameCount += 1; } - if !(r?.last_name is ()) { + if r?.last_name !is () { nameCount += 1; } - if !(r?.'version is ()) { + if r?.'version !is () { nameCount += 1; } if (otherCount > 1 || nameCount > 1) { @@ -235,10 +235,10 @@ public type Address1 record {| isolated function isValidAddress1(Address1 r) returns boolean { int codeCount = 0; - if !(r?.house_number is ()) { + if r?.house_number !is () { codeCount += 1; } - if !(r?.street_number is ()) { + if r?.street_number !is () { codeCount += 1; } if (codeCount > 1) { @@ -285,37 +285,37 @@ public type ZZZ record {| isolated function isValidZzz(ZZZ r) returns boolean { int valueCount = 0; - if !(r?.one_a is ()) { + if r?.one_a !is () { valueCount += 1; } - if !(r?.one_b is ()) { + if r?.one_b !is () { valueCount += 1; } - if !(r?.one_c is ()) { + if r?.one_c !is () { valueCount += 1; } - if !(r?.one_d is ()) { + if r?.one_d !is () { valueCount += 1; } - if !(r?.one_e is ()) { + if r?.one_e !is () { valueCount += 1; } - if !(r?.one_f is ()) { + if r?.one_f !is () { valueCount += 1; } - if !(r?.one_g is ()) { + if r?.one_g !is () { valueCount += 1; } - if !(r?.one_h is ()) { + if r?.one_h !is () { valueCount += 1; } - if !(r?.one_i is ()) { + if r?.one_i !is () { valueCount += 1; } - if !(r?.one_j is ()) { + if r?.one_j !is () { valueCount += 1; } - if !(r?.one_k is ()) { + if r?.one_k !is () { valueCount += 1; } if (valueCount > 1) { diff --git a/tooling-tests/src/test/resources/test-src/generated-sources/tool_test_data_type_9/helloWorldWithReservedNames_pb.bal b/tooling-tests/src/test/resources/test-src/generated-sources/tool_test_data_type_9/helloWorldWithReservedNames_pb.bal index 8998844..30f18bd 100644 --- a/tooling-tests/src/test/resources/test-src/generated-sources/tool_test_data_type_9/helloWorldWithReservedNames_pb.bal +++ b/tooling-tests/src/test/resources/test-src/generated-sources/tool_test_data_type_9/helloWorldWithReservedNames_pb.bal @@ -161,7 +161,7 @@ public type FieldRules record {| isolated function isValidFieldrules(FieldRules r) returns boolean { int typeCount = 0; - if !(r?.'enum is ()) { + if r?.'enum !is () { typeCount += 1; } if (typeCount > 1) {