mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-16 13:23:46 +03:00
49 lines
1.1 KiB
Lua
49 lines
1.1 KiB
Lua
--[[
|
|
| 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
|
|
}
|
|
}
|
|
}
|