Mercurial > hg > ltpda
view 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 |
line wrap: on
line source
#!/usr/bin/ruby class SubTest attr_accessor :testDescription, :syntaxDescription, :algoDescription, :syntaxCode, :algoCode, :number, :syntaxResult, :algoResult, :date def initialize @number = 0 @testDescription = "" @syntaxDescription = "" @algoDescription = "" @syntaxCode = "" @algoCode = "" @syntaxResult = -1 @algoResult = -1 end end class UnitTest attr_accessor :methodDescription, :tests, :results, :path, :title, :code, :tainted def initialize @methodDescription = "" @tests = [] @results = [] @tainted = false @path = "" @title = "" @code = "" end end class Result attr_accessor :syntax, :algorithm, :date, :number def initialize @syntax = -1 @algorithm = -1 @date = Time.now @number = 0 end end