mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 05:43:46 +03:00
Upload
This commit is contained in:
48
lua/tests/gm_express/pon.lua
Normal file
48
lua/tests/gm_express/pon.lua
Normal file
@@ -0,0 +1,48 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
return {
|
||||
groupName = "pON",
|
||||
|
||||
beforeAll = function()
|
||||
require( "pon" )
|
||||
end,
|
||||
|
||||
beforeEach = function( state )
|
||||
state.tbl = {
|
||||
1, "a", true, false, nil, {}, { {}, {}, nil },
|
||||
Color( 1, 1, 1 ), Angle( 1, 1, 1 ), Vector( 1, 1, 1 ), game.GetWorld()
|
||||
}
|
||||
end,
|
||||
|
||||
cases = {
|
||||
{
|
||||
name = "It loads properly",
|
||||
func = function()
|
||||
expect( pon ).to.exist()
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
name = "It encodes a table",
|
||||
func = function( state )
|
||||
expect( pon.encode, state.tbl ).to.succeed()
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
name = "It decodes a pON string",
|
||||
func = function( state )
|
||||
local encoded = pon.encode( state.tbl )
|
||||
expect( pon.decode, encoded ).to.succeed()
|
||||
end
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user