comparison testing/utp_1.1/unittest.rb @ 44:409a22968d5e default

Add unit tests
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Tue, 06 Dec 2011 18:42:11 +0100
parents
children
comparison
equal deleted inserted replaced
43:bc767aaa99a8 44:409a22968d5e
1 #!/usr/bin/ruby
2
3 class SubTest
4 attr_accessor :testDescription, :syntaxDescription, :algoDescription, :syntaxCode, :algoCode, :number, :syntaxResult, :algoResult, :date
5 def initialize
6 @number = 0
7 @testDescription = ""
8 @syntaxDescription = ""
9 @algoDescription = ""
10 @syntaxCode = ""
11 @algoCode = ""
12 @syntaxResult = -1
13 @algoResult = -1
14 end
15 end
16
17 class UnitTest
18 attr_accessor :methodDescription, :tests, :results, :path, :title, :code, :tainted
19
20 def initialize
21 @methodDescription = ""
22 @tests = []
23 @results = []
24 @tainted = false
25 @path = ""
26 @title = ""
27 @code = ""
28 end
29 end
30
31 class Result
32 attr_accessor :syntax, :algorithm, :date, :number
33 def initialize
34 @syntax = -1
35 @algorithm = -1
36 @date = Time.now
37 @number = 0
38 end
39 end