File: procedural-ok-example.pl

package info (click to toggle)
libtest-unit-perl 0.25-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,400 kB
  • sloc: perl: 4,290; makefile: 5
file content (28 lines) | stat: -rw-r--r-- 362 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use Test::Unit;

use constant DEBUG => 0;

# code to be tested will be somewhere around here

# define tests, set_up and tear_down

sub test_ok_1 {
	assert(23 == 23);
}

sub test_ok_2 {
	assert(42 == 42);
}

sub set_up {
	print "hello world\n" if DEBUG;
}

sub tear_down {
	print "leaving world again\n" if DEBUG;
}

# and run them

create_suite();
run_suite();