Debian Codegraph @

t/ok.t

raw symbols SCIP
1 #!/usr/bin/perl
2
3 use warningsscip-perl cpan Test-Inter 1.13 warnings/ 'all';
4 use strictscip-perl cpan Test-Inter 1.13 strict/;
5 BEGIN {
6 if (-d "lib") {
7 use libscip-perl cpan Test-Inter 1.13 lib/ "./lib";
8 } elsif (-d "../lib") {
9 use libscip-perl cpan Test-Inter 1.13 lib/ "../lib";
10 }
11 }
12
13 use Test::Interscip-perl cpan Test-Inter 1.13 Test/Inter/;
14 my $ti = new Test::Inter $0scip-perl cpan Test-Inter 1.13 main/$0.;
15
16 $ti->okscip-perl cpan Test-Inter 1.13 main/ok().();
17 $ti->okscip-perl cpan Test-Inter 1.13 main/ok().( 1 == 1 );
18 $ti->okscip-perl cpan Test-Inter 1.13 main/ok().( 1 == 1, "Basic test" );
19 $ti->okscip-perl cpan Test-Inter 1.13 main/ok().( 1 == 1, 1, "Basic test" );
20 $ti->okscip-perl cpan Test-Inter 1.13 main/ok().( 1 == 1, 2, "Basic test" );
21
22 sub func_falsescip-perl cpan Test-Inter 1.13 main/func_false(). {
23 return 0;
24 }
25 sub func_truescip-perl cpan Test-Inter 1.13 main/func_true(). {
26 return 1;
27 }
28
29 sub funcscip-perl cpan Test-Inter 1.13 main/func(). {
30 my($a,$b) = @_scip-perl cpan Test-Inter 1.13 main/`@_`.;
31 return $a == $b;
32 }
33
34 $ti->okscip-perl cpan Test-Inter 1.13 main/ok().( \&func_truescip-perl cpan Test-Inter 1.13 main/func_true(). );
35 $ti->okscip-perl cpan Test-Inter 1.13 main/ok().( \&func_truescip-perl cpan Test-Inter 1.13 main/func_true()., "True test" );
36 $ti->okscip-perl cpan Test-Inter 1.13 main/ok().( \&func_truescip-perl cpan Test-Inter 1.13 main/func_true()., 1, "True test" );
37 $ti->okscip-perl cpan Test-Inter 1.13 main/ok().( \&func_truescip-perl cpan Test-Inter 1.13 main/func_true()., 2, "True test" );
38
39 $ti->okscip-perl cpan Test-Inter 1.13 main/ok().( \&funcscip-perl cpan Test-Inter 1.13 main/func()., [1,1]);
40 $ti->okscip-perl cpan Test-Inter 1.13 main/ok().( \&funcscip-perl cpan Test-Inter 1.13 main/func()., [1,1], "Func test" );
41 $ti->okscip-perl cpan Test-Inter 1.13 main/ok().( \&funcscip-perl cpan Test-Inter 1.13 main/func()., [1,1], 1, "Func test" );
42 $ti->okscip-perl cpan Test-Inter 1.13 main/ok().( \&funcscip-perl cpan Test-Inter 1.13 main/func()., [1,1], 2, "Func test" );
43
44 $ti->okscip-perl cpan Test-Inter 1.13 main/ok().( [ 'a','b' ], [ 'a','b' ], "List test" );
45 $ti->okscip-perl cpan Test-Inter 1.13 main/ok().( [ 'a','b' ], [ 'a','c' ], "List test (non-identical)" );
46
47 $ti->okscip-perl cpan Test-Inter 1.13 main/ok().( { 'a' => 1, 'b' => 2 }, { 'a' => 1, 'b' => 2 }, "Hash test" );
48 $ti->okscip-perl cpan Test-Inter 1.13 main/ok().( { 'a' => 1, 'b' => 2 }, { 'a' => 1, 'b' => 3 }, "Hash test (non-identical)" );
49
50 $ti->done_testingscip-perl cpan Test-Inter 1.13 main/done_testing().();
51