| 🌟 | 現在、 鉄壁HSは通常HSと同じダメージになります。LMG及びDMR、チャージライフル、ハンマーポイント弾を除き、すべてのダメージ値が一致していることを確認しています。 |
モジュール:Utility/Prototypes/testcases
ナビゲーションに移動
検索に移動
このモジュールについての説明文ページを モジュール:Utility/Prototypes/testcases/doc に作成できます
local p = {}
local proto = require('Module:Utility/Prototypes')
function p.main()
local pointProto = {
x = proto.Integer,
y = proto.NumberRange(0, 9),
}
local data = {
SimpleOK = { x = 4, y = 8 },
StringNG = { x = 4, y = '8' },
JustOK = { x = 4, y = 9 },
OutOfRange1NG = { x = 4, y = 9.01 },
OutOfRange2NG = { x = 4, y = -8 },
NoIntegerNG = { x = 4.5, y = 8 },
NonTableNG = 31,
}
local tbl = mw.html.create('table'):addClass('wikitable')
tbl:tag('tr')
:tag('th'):wikitext('Name'):done()
:tag('th'):wikitext('x'):done()
:tag('th'):wikitext('y'):done()
:tag('th'):wikitext('Result')
for name, d in pairs(data) do
local row = tbl:tag('tr')
:tag('td'):wikitext(name):done()
if type(d) == 'table' then
row:tag('td'):wikitext(d.x):done()
:tag('td'):wikitext(d.y)
else
row:tag('td'):attr('colspan', 2):wikitext(d)
end
row:tag('td'):wikitext(proto.validateTypes(d, pointProto) and '✔️' or '❌')
end
return tostring(tbl)
end
return p