Show attendance and weather before live ticker kickoff (by Codex)
This commit is contained in:
1 parent
ef25407484
commit
b845bbfcbc
10 files changed
+144
-14
No files matched your search
@@ -93,19 +93,28 @@ int main(int argc, char **argv) {
|
||||
review.at("overview").at("chances") == 28 &&
|
||||
review.at("overview").at("scope") == "recorded_human_matches",
|
||||
"overview aggregates final recorded matches once, not once per human or whole league");
|
||||
require(review.at("overview").at("attendance").is_null() &&
|
||||
require(review.at("overview").at("attendance") == 57550 &&
|
||||
!review.at("eleven").at("available").get<bool>() && review.at("eleven").at("reason") == "not_recorded" &&
|
||||
review.at("eleven").at("rows").empty(), "unrecorded crowd and nominations stay unknown");
|
||||
review.at("eleven").at("rows").empty(), "crowds counted once per match while unrecorded nominations stay unknown");
|
||||
require(review.at("tables").size() == 1 && review.at("tables")[0].at("match_ids").size() == 2 &&
|
||||
review.at("tables")[0].at("rows") == recording.at("frames").back().at("matches")[0].at("standings") &&
|
||||
review.at("tables")[0].at("wins").is_null(), "shared final table is copied verbatim without season formula");
|
||||
for (size_t i = 0; i < review.at("matches").size(); ++i) {
|
||||
const auto &row = review.at("matches")[i];
|
||||
require(row.at("final") == recording.at("frames").back().at("matches")[i] &&
|
||||
row.at("id") == recording.at("matches")[i].at("id") && row.at("attendance").is_null(),
|
||||
row.at("id") == recording.at("matches")[i].at("id") &&
|
||||
row.at("attendance") == recording.at("matches")[i].at("attendance") &&
|
||||
row.at("weather") == recording.at("matches")[i].at("weather"),
|
||||
"result fields and identities equal exact final snapshot");
|
||||
for (const auto &event : row.at("events")) require(event.at("match_id") == row.at("id"), "events cannot leak from another match");
|
||||
}
|
||||
auto old_recording = recording;
|
||||
for (auto &match : old_recording["matches"]) { match.erase("attendance"); match.erase("weather"); }
|
||||
const auto old_review = make_demo_post_match(old_recording, 8);
|
||||
require(old_review.at("overview").at("attendance").is_null() &&
|
||||
old_review.at("matches")[0].at("attendance").is_null() &&
|
||||
old_review.at("matches")[0].at("weather").is_null(),
|
||||
"old recordings still keep unrecorded crowds and weather unknown");
|
||||
require(source.read_post_match(request(recording)) == review, "DemoSource read hook gives pure final review");
|
||||
Json supplied = {{"schema", "openbmh-post-match-records@1"},
|
||||
{"fixture_id", recording.at("fixture_id")},
|
||||
|
||||
Reference in new issue
Block a user