Skip to content

Commit b9ae713

Browse files
Add tests for the unary '+' operator
1 parent d1b454f commit b9ae713

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
script "CoreMathUnaryPlus"
2+
/*
3+
Copyright (C) 2016 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+
20+
on TestUnaryPlus
21+
TestAssert "Unary plus", +1 is 1
22+
TestAssert "Unary plus in arithmetic expression", (+15/-15) is -1
23+
TestAssert "Unary plus in function", (the sin of + 1) is sin(1)
24+
end TestUnaryPlus

0 commit comments

Comments
 (0)