1
0

Debuggers: Added a Base64 API roundtrip test.

This commit is contained in:
madmaxoft 2014-04-02 11:58:19 +02:00
parent bcd7f9669b
commit 67d7ad8689

View File

@ -69,12 +69,13 @@ function Initialize(Plugin)
LOG("Initialized " .. Plugin:GetName() .. " v." .. Plugin:GetVersion()) LOG("Initialized " .. Plugin:GetName() .. " v." .. Plugin:GetVersion())
-- TestBlockAreas(); -- TestBlockAreas()
-- TestSQLiteBindings(); -- TestSQLiteBindings()
-- TestExpatBindings(); -- TestExpatBindings()
-- TestPluginCalls(); -- TestPluginCalls()
TestBlockAreasString() TestBlockAreasString()
TestStringBase64()
--[[ --[[
-- Test cCompositeChat usage in console-logging: -- Test cCompositeChat usage in console-logging:
@ -252,6 +253,24 @@ end
function TestStringBase64()
-- Create a binary string:
local s = ""
for i = 0, 255 do
s = s .. string.char(i)
end
-- Roundtrip through Base64:
local Base64 = Base64Encode(s)
local UnBase64 = Base64Decode(Base64)
assert(UnBase64 == s)
end
function TestSQLiteBindings() function TestSQLiteBindings()
LOG("Testing SQLite bindings..."); LOG("Testing SQLite bindings...");