Opened 7 years ago

Last modified 20 months ago

#4427 new defect

Tests for globalscripts

Reported by: fatherbushido Owned by:
Priority: Should Have Milestone: Backlog
Component: Simulation Keywords:
Cc: Itms Patch: Phab:D151

Description (last modified by elexis)

Currently the tests for the Math globalscripts are in the component/tests folder. It would be nice to move them in globalscripts/tests or something like that and so we could add tests of other globalscripts in that folder. (I want to use write some tests for global functions of #4263 but I find it ugly of putting them in simulation/tests)

Change History (11)

comment:1 by Itms, 7 years ago

I agree, thanks for bringing the issue. I have a half-baked patch (needed for #2951) that proposes the following (which is more general that just globalscripts tests):

  • move test_scripts.h somewhere else in the source hierarchy (probably under scriptinterface/)
  • inside that file, have several tests, each of those would call the scripts under a specific folder (test_simulationComponents would call the tests under simulation/components/tests, test_globalScripts would call the tests under globalscripts/tests, etc.)

Additionally, it would be nice to be able to pass a -mod argument to test so this multi-purpose test_scripts.h would load specific mods. That way the unit tests are fully moddable and we can even get rid of the warning that the public mod is absent when testing the release bundle without the data bundle. (useful for packagers)

comment:2 by fatherbushido, 7 years ago

nice!

comment:4 by elexis, 7 years ago

Milestone: Alpha 22Work In Progress

Moving to the Work In Progress milestone, since there is a patch asking for feedback, but since it is not strictly bound to a specific release.

comment:5 by elexis, 7 years ago

In 20262:

Add test for globalscripts vector, refs #4427.

comment:6 by elexis, 6 years ago

Description: modified (diff)

refs #4827

comment:7 by elexis, 6 years ago

In r20637:

Define, document, validate and test validation of the format of mod.json files.

The mod "name" may only consist of alphanumeric characters, underscore and dash, because it should be used for mod dependency checks.
Drop two special characters from the "version" property.

Differential Revision: ​https://code.wildfiregames.com/D1093 Res #4427, r20552
Reviewed By: Itms

comment:8 by Itms, 5 years ago

Component: UI & SimulationSimulation
Patch: Phab:D151

comment:9 by Freagarach, 4 years ago

Globalscript test added in r22970. See also Phab:D2645.

comment:10 by Silier, 3 years ago

Owner: set to Itms

comment:11 by Stan, 20 months ago

Milestone: Work In ProgressBacklog
Owner: Itms removed

Backlogging due to lack of progress and the user retiring.

Note: See TracTickets for help on using tickets.