Mercurial > luatestmorecoronaexamples
changeset 1:aea23eab4edd tip
Fixed bad script check in.
author | Eric Wing <ewing@anscamobile.com> |
---|---|
date | Wed, 10 Aug 2011 13:07:25 -0700 |
parents | eacdc5a12922 |
children | |
files | BasicTest/main.lua |
diffstat | 1 files changed, 14 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/BasicTest/main.lua Wed Aug 10 12:47:55 2011 -0700 +++ b/BasicTest/main.lua Wed Aug 10 13:07:25 2011 -0700 @@ -1,11 +1,20 @@ +-- This is only for our slightly modified scripts. +-- Use require('Test.More') if you use the official lua-TestMore files require('More') -plan(2) -- Specify the number of tests you plan to run. -local nothing = nil +-- Specify the number of tests you plan to run. +plan(2) +local someValue = 1 local test_count = 0 -is(someValue, 1, "someValue should be equal to 1") -- This function verifies parameter 1 is equal to parameter 2 + +-- This function verifies parameter 1 is equal to parameter 2 +is(someValue, 1, "someValue should be equal to 1") test_count = test_count + 1 -isnt(someValue, nil) -- This function verifies parameter 1 is not equal to parameter 2 + +-- This function verifies parameter 1 is not equal to parameter 2 +isnt(someValue, nil) test_count = test_count + 1 -done_testing(test_count) -- declare you are done testing and the number of tests you have run + +-- declare you are done testing and the number of tests you have run +done_testing(test_count) --os.exit() -- convenient to have to make sure the process completely ends.