[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

obsolete[m8n] 75 inlines magnitude

Tests for compiled methods with inlined code (category: magnitude)

-- setup
test=smalltalk.Test:new()


--core inlines (> < >= <=)
if (not test:is_gt_(9,3)) then error("Wrong result") end
if (not test:is_lt_(1,3)) then error("Wrong result") end
if (not test:is_ge_(9,3)) then error("Wrong result") end
if (not test:is_ge_(3,3)) then error("Wrong result") end
if (not test:is_le_(1,3)) then error("Wrong result") end
if (not test:is_le_(1,1)) then error("Wrong result") end
if (not test:isPositive_(101)) then error("Wrong result") end
if (not test:isPositiveOrZero_(101)) then error("Wrong result") end
if (not test:isPositiveOrZero_(0)) then error("Wrong result") end
if (not test:isNegative_(-101)) then error("Wrong result") end
if (not test:isNegativeOrZero_(-101)) then error("Wrong result") end
if (not test:isNegativeOrZero_(0)) then error("Wrong result") end


-- cleanup
test = nil