Permalink
Browse files

Cleaning, release in progress

  • Loading branch information...
1 parent e517a2d commit ca7f9e95d0c5bc3a79daa134c8fc44cca3805d14 @bluebird75 committed Oct 29, 2012
Showing with 21 additions and 73 deletions.
  1. +3 −1 README.txt
  2. +18 −0 TODO.txt
  3. +0 −72 test_luaunit.lua
View
4 README.txt
@@ -23,11 +23,13 @@ History:
version 1.5: (in progress)
------------
-- compatibility with Lua 5.1 and 5.2
+- compatibility with Lua 5.0, 5.1 and 5.2
- better object model internally
- a lot more of internal tests
- several internal bug fixes
- make it easy to customize the test output
+- running test functions no longer requires a wrapper
+- several level of verbosity
version 1.4: 26. Jul 2012
View
18 TODO.txt
@@ -0,0 +1,18 @@
+--[[ More tests ]]
+-- strip luaunit stack more intelligently
+-- table assertions
+-- better verbosity support
+-- assert contains
+-- more user documentation
+-- compatibilty tests with several version of lua
+-- real test for wrapFunctions
+-- sequence asserts
+-- display time to run all tests
+-- make sure test suite ends when running tests with RunByTestClass or RunByTestMethod
+-- add assertNotEquals
+-- add assertAlmonstEquals for floats
+-- add assertContains for strings
+
+Done:
+
+
View
72 test_luaunit.lua
@@ -507,80 +507,8 @@ TestLuaUnit = {} --class
end
-function dispParams(isReturn)
- local params = ''
- local level = 3
- local firstParam=true
- local sep=''
- local idx=1
- if isReturn then
- level = 4
- end
- local var, val = debug.getlocal(level,idx)
- while var ~= nil do
- if var ~= '(*temporary)' then
- params = params..sep..var..'='..tostring(val)
- if firstParam then
- sep = ', '
- firstParam = false
- end
- end
- idx = idx + 1
- var,val = debug.getlocal(level,idx)
- end
- if string.len(params) then
- if isReturn then
- return '()\n'..params
- end
- return '('..params..' )'
- end
- return nil
-end
-
-function debug_print( event )
- local extra = ''
- local info = debug.getinfo(2, 'n')
- level = level or 0
- if event == 'call' then
- level = level + 1
- end
- indentPrefix = string.rep( ' ', level )
- if info.namewhat == 'global' or info.namewhat == 'method' then
- local name = info.namewhat
- if info.name and name ~= info.name then
- name = name..' '..info.name
- end
- if event == 'call' or event == 'return' then
- local extra = dispParams(event == 'return')
- if extra then
- name = name..extra
- end
- end
- print( "DEBUG: "..indentPrefix..event..' '..name )
- end
- if event == 'return' then
- level = level - 1
- end
-end
-
-
-
-- debug.sethook( debug_print, 'cr' )
LuaUnit.verbosity = 2
-- LuaUnit:run( 'TestMock', 'TestLuaUnit:testRunSomeTestByName')
LuaUnit:run()
---[[ More tests ]]
--- strip luaunit stack more intelligently
--- table assertions
--- better verbosity support
--- assert contains
--- more user documentation
--- compatibilty tests with several version of lua
--- real test for wrapFunctions
--- sequence asserts
--- display time to run all tests
--- make sure test suite ends when running tests with RunByTestClass or RunByTestMethod
--- add assertNotEquals
--- add assertAlmonstEquals for floats
--- add assertContains for strings

0 comments on commit ca7f9e9

Please sign in to comment.