Skip to content

Commit

Permalink
Fix testcases
Browse files Browse the repository at this point in the history
  • Loading branch information
Ishad-M-I-M committed Oct 9, 2023
1 parent 1a1fbb6 commit 49226a8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 49226a8

Please sign in to comment.