#4522 closed defect (fixed)
Template Manager test_load_all returns many errors
Reported by: | fatherbushido | Owned by: | fatherbushido |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 23 |
Component: | Core engine | Keywords: | |
Cc: | Patch: |
Description (last modified by )
It seems that this test needs to be updated.
Here is the kind of error I get:
ERROR: JavaScript error: simulation/components/BuildRestrictions.js line 339 ReferenceError: markForTranslationWithContext is not defined @simulation/components/BuildRestrictions.js:339:1 ERROR: CXeromyces: Parse error: in_memory_buffer:9: Element choice is empty ERROR: RelaxNGValidator: Failed to compile schema # campaigns/army_mace_hero_alexander ERROR: RelaxNGValidator: No grammar loaded ERROR: Failed to validate entity template 'campaigns/army_mace_hero_alexander' In TestCmpTemplateManager_2::test_load_all: /home/titi/0adsvn/source/simulation2/tests/test_CmpTemplateManager.h:254: Error: Assertion failed: p != __null # campaigns/army_mace_standard
Attachments (1)
Change History (9)
comment:1 by , 7 years ago
Component: | UI & Simulation → Core engine |
---|
comment:2 by , 7 years ago
Description: | modified (diff) |
---|---|
Priority: | Should Have → Must Have |
comment:3 by , 7 years ago
by , 7 years ago
comment:4 by , 7 years ago
Nice research. Maybe it's nicer to omit the boost inclusion and just use substr to compare.
Also I'm not a fan of hardcoded paths in C++, placeablesFilter.json
and so forth. Maybe special templates shouldn't be in that templates directory to begin with but in simulation/special_templates/ folder? (Just a thought that could be done somewhere else by someone else sometime later).
comment:5 by , 7 years ago
This test has been disabled since it was added in r7465, and I guess should stay that way (or at not least print the name of every template).
Sure. (As the code comment says). The test is also perhaps obsolete or not with those other scripts which needs the same kind of update see #4560 (and while at it #4550 :p)
It seems the issue is the mod mod is not added to the VFS in
setUp()
in TestCmpTemplateManager_2, which is needed asmarkForTranslationWithContext
is defined in mods/mod/globalscripts/l10n.js. This test has been disabled since it was added in r7465, and I guess should stay that way (or at not least print the name of every template).So now when the test is run with the mod mod, it just fails for special/actor.xml, the templates in /special_units, and some of the templates in special_filter. This is expected for /special_filter I guess (and shouldn't try to load those directly, or maybe it should), as those templates are dynamic, and the other failures are for templates that are pure "abstract" parent templates.
The attached patch doesn't try to get templates in /special_filter.