Upgraded luaunit

squeeze-backports
Victor Seva 13 years ago
parent 32b7cd9e15
commit d2aafe02e7

@ -188,6 +188,18 @@ function assertIsFunction(value)
end end
end end
function assertIs(actual, expected)
if actual ~= expected then
error( errormsg(actual, expected), 2 )
end
end
function assertNotIs(actual, expected)
if actual == expected then
error( errormsg(actual, expected), 2 )
end
end
assert_equals = assertEquals assert_equals = assertEquals
assert_not_equals = assertNotEquals assert_not_equals = assertNotEquals
assert_error = assertError assert_error = assertError
@ -199,6 +211,8 @@ assert_is_table = assertIsTable
assert_is_boolean = assertIsBoolean assert_is_boolean = assertIsBoolean
assert_is_nil = assertIsNil assert_is_nil = assertIsNil
assert_is_function = assertIsFunction assert_is_function = assertIsFunction
assert_is = assertIs
assert_not_is = assertNotIs
function __genOrderedIndex( t ) function __genOrderedIndex( t )
local orderedIndex = {} local orderedIndex = {}

Loading…
Cancel
Save