mirror of
https://github.com/OpenMW/openmw.git
synced 2025-12-12 17:43:05 +00:00
Add integration tests
This commit is contained in:
parent
450f907166
commit
8073c59898
3 changed files with 15 additions and 0 deletions
|
|
@ -137,6 +137,7 @@ testing.registerGlobalTest('record stores', function()
|
|||
|
||||
testRecordStore(core.sound, "sound")
|
||||
testRecordStore(core.factions, "factions")
|
||||
testRecordStore(core.regions, "regions")
|
||||
testRecordStore(core.dialogue.greeting, "dialogue greeting")
|
||||
testRecordStore(core.dialogue.topic, "dialogue topic")
|
||||
testRecordStore(core.dialogue.journal, "dialogue journal")
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ end
|
|||
require('global_issues')
|
||||
require('global_dialogues')
|
||||
require('global_mwscript')
|
||||
require('global_regions')
|
||||
|
||||
return {
|
||||
engineHandlers = {
|
||||
|
|
|
|||
13
scripts/data/morrowind_tests/global_regions.lua
Normal file
13
scripts/data/morrowind_tests/global_regions.lua
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
local testing = require('testing_util')
|
||||
local core = require('openmw.core')
|
||||
local util = require('openmw.util')
|
||||
|
||||
testing.registerGlobalTest('[regions] Should expose Bitter Coast', function()
|
||||
local record = core.regions.records['bitter coast region']
|
||||
testing.expect(record ~= nil, 'Bitter Coast Region to exist')
|
||||
testing.expectEqual(record.mapColor, util.color.hex('2227FF'))
|
||||
for id, probability in pairs(record.weatherProbabilities) do
|
||||
testing.expect(core.weather.records[id] ~= nil, 'weather ' .. id .. 'to exist')
|
||||
end
|
||||
testing.expectEqual(record.weatherProbabilities.cloudy, 60, 'cloudy weather to occur 60% of the time')
|
||||
end)
|
||||
Loading…
Reference in a new issue