☰
Debian Codegraph
@
1.5.5.8-1
/
/
src
/
test
/
01-Basic
/
181-return-ctrl-paths-1.ck
☽
☼
src/test/01-Basic/181-return-ctrl-paths-1.ck
code
plain
raw
GPL-2.0+
2004 Ge Wang and Perry R. Cook. All rights reserved.
debian/copyright
1
// all control paths return
2
3
fun float foo( int v )
4
{
5
if( v == 1 )
6
{
7
return 1;
8
}
9
else if( v == 2 )
10
{
11
return 2;
12
}
13
else
14
{
15
return 3;
16
}
17
}
18
19
// success case
20
if( Math.equal(foo(1)+foo(2)+foo(3), 6) )
21
<<< "success" >>>;