Keep synthetic UI data outside private reference paths (by Codex)

This commit is contained in:
Codex committed 2026-10-28 20:36:23 +01:00
1 parent 959154c3c0
commit ddd4447563
6 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -185,7 +185,7 @@ statt Außenwetter. Zwei gegnerische menschliche Manager teilen dieselbe Partie
und damit dieselben Bedingungen. Die Werte werden auch in den Nachspielbericht
übernommen; eine Übersicht zählt jede Partie nur einmal.
Die optionalen Felder auf jedem `openbmh-live-fixture@1.matches[]`-Eintrag sind:
Die optionalen Felder auf jedem `matches[]`-Eintrag von `openbmh-live-fixture@1` sind:
```json
{"attendance": 26400, "weather": {"temperature": 18, "rain": 0}}
+1 -1
View File
@@ -77,7 +77,7 @@ path. Available records replace only `eleven` and remove it from
`unknown_fields`. Scores, report events, timeline minutes, tables and all other
review facts remain unchanged. Missing records retain byte-identical defaults.
`tests/fixtures/modern_post_match_eleven.json` is an explicitly synthetic
`tests/synthetic/modern_post_match_eleven.json` is an explicitly synthetic
standalone layout fixture containing `eleven` and its notice. It deliberately
contains no guessed fixture/revision binding. The core test binds it to its
actual synthetic recording; a document renderer test may use the same `eleven`
+2 -2
View File
@@ -138,7 +138,7 @@ foreach(component statistics news settings desktop files entry opening career li
target_compile_options(modern_${component}_ui_tests PRIVATE /utf-8)
endif()
if(component STREQUAL "post_match")
add_test(NAME modern_${component}_ui_tests COMMAND modern_${component}_ui_tests "${CMAKE_SOURCE_DIR}/tests/fixtures/modern_post_match_eleven.json")
add_test(NAME modern_${component}_ui_tests COMMAND modern_${component}_ui_tests "${CMAKE_SOURCE_DIR}/tests/synthetic/modern_post_match_eleven.json")
else()
add_test(NAME modern_${component}_ui_tests COMMAND modern_${component}_ui_tests)
endif()
@@ -149,7 +149,7 @@ target_link_libraries(modern_news_catalog_tests PRIVATE bmh_modern_ui_core)
if(MSVC)
target_compile_options(modern_news_catalog_tests PRIVATE /utf-8)
endif()
add_test(NAME modern_news_catalog_tests COMMAND modern_news_catalog_tests "${CMAKE_SOURCE_DIR}/assets/modern/news-catalog.json" "${CMAKE_SOURCE_DIR}/tests/fixtures/modern_news_catalog_reference.json")
add_test(NAME modern_news_catalog_tests COMMAND modern_news_catalog_tests "${CMAKE_SOURCE_DIR}/assets/modern/news-catalog.json" "${CMAKE_SOURCE_DIR}/tests/synthetic/modern_news_catalog_reference.json")
# Pure DTO tests need no proprietary content; the opt-in probe accepts a user's world.
add_executable(modern_engine_dto_tests ../../../tests/modern_engine_dto_tests.cpp)
+1 -1
View File
@@ -155,7 +155,7 @@ void script_locator_cases(Rml::Context &context, float density) {
}
}
void postmatch_eleven_cases(Rml::Context &context,const std::string &css,const char *theme) {
const auto fixture=std::filesystem::path(__FILE__).parent_path()/"fixtures/modern_post_match_eleven.json";
const auto fixture=std::filesystem::path(__FILE__).parent_path()/"synthetic/modern_post_match_eleven.json";
std::ifstream file(fixture);require(bool(file),"Synthetic supplied eleven fixture missing");
const auto data=Json::parse(file).at("eleven");
const PostmatchBadge badge=[](const Json &,double size){return "<span style='width:"+std::to_string(size)+"dp;height:"+std::to_string(size)+"dp;'>B</span>";};