Add assertion on testdata/countryinfo.txt sorting.
This will prevent silently creating bogus keys in FakeDownloader if the
sorting isn't as expected.
R=rouslan@chromium.org
BUG=
Review URL: https://codereview.appspot.com/113530043
diff --git a/cpp/test/fake_downloader.cc b/cpp/test/fake_downloader.cc
index 2008f56..1795b2b 100644
--- a/cpp/test/fake_downloader.cc
+++ b/cpp/test/fake_downloader.cc
@@ -125,6 +125,10 @@
// , "data/CH/AG": {"name": "Aargau"}
aggregate_data_it->second.append(", \"" + key + "\": " + value);
} else {
+ // The countryinfo.txt file must be sorted so that subkey data
+ // follows directly after its parent key data.
+ assert(key.size() == kAggregateDataKeyLength);
+
// Make the aggregate data strings valid. For example, this incomplete
// JSON data:
// {"data/CH/AG": {"name": "Aargau"},