Skip to content

Commit f9586b3

Browse files
committed
Fixed data point in India, updated test set
1 parent 3d386f6 commit f9586b3

File tree

13 files changed

+1081
-1060
lines changed

13 files changed

+1081
-1060
lines changed
0 Bytes
Binary file not shown.

src/test/java/com/mapcode/ReferenceFileTest.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ private static void checkFile(@Nonnull final String baseFileName) throws Excepti
190190

191191
// This does not fail the test, but rather produces an ERROR in the log file.
192192
// It indicates a discrepancy in the C and Java implementations.
193-
LOG.error("checkFile: Created '{}' at {} which is not present in the reference file!\nref={}\nresult={}",
193+
LOG.error("checkFile: Created '{}' at {} which is not present in the reference file!\n" +
194+
"ref={}\n" + "new={}",
194195
result.getCode(precision), reference.point, GSON.toJson(reference), GSON.toJson(result));
195196
++error;
196197
}
@@ -209,8 +210,10 @@ private static void checkFile(@Nonnull final String baseFileName) throws Excepti
209210
}
210211
}
211212
if (!found) {
212-
LOG.error("checkFile: Found '{} {}' at {} in reference file, not produced by new decoder!",
213-
referenceMapcodeRec.territory, referenceMapcodeRec.mapcode, reference.point);
213+
LOG.error("checkFile: Found '{} {}' at {} in reference file, not produced by new decoder!\n" +
214+
"ref={}",
215+
referenceMapcodeRec.territory, referenceMapcodeRec.mapcode, reference.point,
216+
GSON.toJson(reference));
214217
++error;
215218
}
216219
}

src/test/resources/README

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@ mapcode --grid 10000 0 > grid_10k.txt
3737
mapcode --grid 100000 0 > grid_100k.txt
3838

3939
mapcode --boundaries > boundaries.txt
40-
+----
41-
42-
And for the high-precision codes:
4340

44-
+----
4541
mapcode --random 1000 2 12 > random_hp_1k.txt
4642
mapcode --random 10000 2 12 > random_hp_10k.txt
4743
mapcode --random 100000 2 12 > random_hp_100k.txt
@@ -51,18 +47,16 @@ mapcode --grid 10000 2 > grid_hp_10k.txt
5147
mapcode --grid 100000 2 > grid_hp_100k.txt
5248

5349
mapcode --boundaries 2 > boundaries_hp.txt
50+
51+
for f in *.txt; do split -l 200000 -a 1 $f $f.; rm $f; done
5452
+----
5553

5654
IMPORTANT: Please note that an explicit seed (12) is used for the generation of
5755
random data sets, so they can be compared across different version of the software.
5856

5957
After generating the files, they must be split into smaller pieces (in this case
6058
5Mb chunks) to allow uploading to Github or other source code control systems,
61-
by executing:
62-
63-
+----
64-
for f in *.txt; do split -l 200000 -a 1 $f $f.; rm $f; done
65-
+----
59+
hence the 'split' command.
6660

6761
-------------------------------------------------------------------------------
6862
COMPILING THE MAPCODE UTILITY

0 commit comments

Comments
 (0)