PageRenderTime 8ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/tutorial/signal/b.e

http://github.com/tybor/Liberty
Specman e | 96 lines | 85 code | 11 blank | 0 comment | 0 complexity | 8ca72f713fb275d0174d54badfc69b45 MD5 | raw file
 1class B
 2
 3creation {ANY}
 4	make
 5
 6feature {ANY}
 7	s, s1: SIGNAL_1[INTEGER] --declare variable of SIGNAL type, never inherit form SIGNAL.
 8
 9	j: INTEGER
10
11feature {}
12	make is
13		do
14			create s.make
15			create s1.make
16		end
17
18feature {ANY}
19	test (counter: INTEGER) is
20		local
21			i: INTEGER
22		do
23			from
24				i := 1
25			until
26				i > counter
27			loop
28				s.emit(i)
29				i := i + 1
30			end
31		end
32
33	test_direct_0 (counter: INTEGER) is
34		local
35			i: INTEGER
36		do
37			from
38				i := 1
39			until
40				i > counter
41			loop
42				i := i + 1
43			end
44		end
45
46	test_direct_1 (counter: INTEGER) is
47		local
48			i: INTEGER
49		do
50			from
51				i := 1
52			until
53				i > counter
54			loop
55				foo(i)
56				i := i + 1
57			end
58		end
59
60	test_direct_2 (counter: INTEGER) is
61		local
62			i: INTEGER
63		do
64			from
65				i := 1
66			until
67				i > counter
68			loop
69				foo(i)
70				foo(i)
71				i := i + 1
72			end
73		end
74
75	test_direct_3 (counter: INTEGER) is
76		local
77			i: INTEGER
78		do
79			from
80				i := 1
81			until
82				i > counter
83			loop
84				foo(i)
85				foo(i)
86				foo(i)
87				i := i + 1
88			end
89		end
90
91	foo (k: INTEGER) is
92		do
93			j := k + 1
94		end
95
96end -- class B