Skip to content

Commit 8e1c022

Browse files
authored
Update all_test.dart
1 parent 502607f commit 8e1c022

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

dart/test/all_test.dart

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,15 @@ checkShortCode(String csvLine) {
5757
num lat = double.parse(elements[1]);
5858
num lng = double.parse(elements[2]);
5959
String shortCode = elements[3];
60-
String short = olc.shorten(code, lat, lng);
61-
expect(short, equals(shortCode));
62-
String expanded = olc.recoverNearest(short, lat, lng);
63-
expect(expanded, equals(code));
60+
String testType = elements[4];
61+
if (testType == "B" || testType == "S") {
62+
String short = olc.shorten(code, lat, lng);
63+
expect(short, equals(shortCode));
64+
}
65+
if (testType == "B" || testType == "R") {
66+
String expanded = olc.recoverNearest(shortCode, lat, lng);
67+
expect(expanded, equals(code));
68+
}
6469
}
6570

6671
List<String> getCsvLines(String fileName) {

0 commit comments

Comments
 (0)