Skip to content

Commit a4bce2d

Browse files
author
livecodeali
committed
[[ Bug 16740 ]] Add tests
1 parent e3810e4 commit a4bce2d

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
script "CoreExecutionTypeConversion"
2+
/*
3+
Copyright (C) 2015 LiveCode Ltd.
4+
5+
This file is part of LiveCode.
6+
7+
LiveCode is free software; you can redistribute it and/or modify it under
8+
the terms of the GNU General Public License v3 as published by the Free
9+
Software Foundation.
10+
11+
LiveCode is distributed in the hope that it will be useful, but WITHOUT ANY
12+
WARRANTY; without even the implied warranty of MERCHANTABILITY or
13+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
18+
19+
on TestDoubleToInt
20+
TestAssert "round up positive reals in integer expressions", char 0.5 of "ab" is "a"
21+
TestAssert "round down negative reals in integer expressions", char -0.5 of "ab" is "b"
22+
end TestDoubleToInt
23+
24+
on TestDoubleToUInt
25+
create button
26+
create button
27+
relayer it before layer 0.5
28+
TestAssert "round up positive reals in unsigned integer expressions", the layer of it is 1
29+
end TestDoubleToUInt

0 commit comments

Comments
 (0)