Parent

Included Modules

TestSimpleUncomment

Test uncommenting lines

Public Instance Methods

setup() click to toggle source
    # File test/SimpleUncomment/SimpleUncomment.rb, line 16
16:   def setup
17:     setRootDir(File.dirname(__FILE__))
18:   end
testCategory1() click to toggle source
     # File test/SimpleUncomment/SimpleUncomment.rb, line 120
120:   def testCategory1
121:     RCodeLeveler::setLevel(4)
122:     requireFile('Several')
123:     assert_equal(1,$Var1)
124:     assert_equal(nil,$Var2)
125:   end
testCategory2() click to toggle source
     # File test/SimpleUncomment/SimpleUncomment.rb, line 126
126:   def testCategory2
127:     RCodeLeveler::setLevel(6)
128:     requireFile('Several')
129:     assert_equal(1,$Var1)
130:     assert_equal(1,$Var2)
131:   end
testCategoryEqual() click to toggle source
    # File test/SimpleUncomment/SimpleUncomment.rb, line 57
57:   def testCategoryEqual
58:     RCodeLeveler::setLevel(3,'MyCat')
59:     requireFile('Category')
60:     assert_equal(1,$Var)
61:   end
testCategoryGreater() click to toggle source
    # File test/SimpleUncomment/SimpleUncomment.rb, line 62
62:   def testCategoryGreater
63:     RCodeLeveler::setLevel(4,'MyCat')
64:     requireFile('Category')
65:     assert_equal(1,$Var)
66:   end
testCategoryLower() click to toggle source
    # File test/SimpleUncomment/SimpleUncomment.rb, line 52
52:   def testCategoryLower
53:     RCodeLeveler::setLevel(2,'MyCat')
54:     requireFile('Category')
55:     assert_equal(nil,$Var)
56:   end
testCategoryNIL() click to toggle source

Test category uncomment

    # File test/SimpleUncomment/SimpleUncomment.rb, line 48
48:   def testCategoryNIL
49:     requireFile('Category')
50:     assert_equal(nil,$Var)
51:   end
testCategoryOther() click to toggle source
    # File test/SimpleUncomment/SimpleUncomment.rb, line 67
67:   def testCategoryOther
68:     RCodeLeveler::setLevel(3,'MyCatUnknown')
69:     requireFile('Category')
70:     assert_equal(nil,$Var)
71:   end
testCategoryReset() click to toggle source
    # File test/SimpleUncomment/SimpleUncomment.rb, line 72
72:   def testCategoryReset
73:     RCodeLeveler::setLevel(3,'MyCat')
74:     RCodeLeveler::resetLevels
75:     requireFile('Category')
76:     assert_equal(nil,$Var)
77:   end
testDefaultEqual() click to toggle source
    # File test/SimpleUncomment/SimpleUncomment.rb, line 30
30:   def testDefaultEqual
31:     RCodeLeveler::setLevel(3)
32:     requireFile('Default')
33:     assert_equal(1,$Var)
34:   end
testDefaultGreater() click to toggle source
    # File test/SimpleUncomment/SimpleUncomment.rb, line 35
35:   def testDefaultGreater
36:     RCodeLeveler::setLevel(4)
37:     requireFile('Default')
38:     assert_equal(1,$Var)
39:   end
testDefaultLower() click to toggle source
    # File test/SimpleUncomment/SimpleUncomment.rb, line 25
25:   def testDefaultLower
26:     RCodeLeveler::setLevel(2)
27:     requireFile('Default')
28:     assert_equal(nil,$Var)
29:   end
testDefaultNIL() click to toggle source

Test default uncomment

    # File test/SimpleUncomment/SimpleUncomment.rb, line 21
21:   def testDefaultNIL
22:     requireFile('Default')
23:     assert_equal(nil,$Var)
24:   end
testDefaultReset() click to toggle source
    # File test/SimpleUncomment/SimpleUncomment.rb, line 40
40:   def testDefaultReset
41:     RCodeLeveler::setLevel(3)
42:     RCodeLeveler::resetLevels
43:     requireFile('Default')
44:     assert_equal(nil,$Var)
45:   end
testMissingCategoryCategory() click to toggle source

Test missing category for category

     # File test/SimpleUncomment/SimpleUncomment.rb, line 158
158:   def testMissingCategoryCategory
159:     assert_raise(RCodeLeveler::ParseError) do
160:       requireFile('MissingCategoryCategory')
161:     end
162:     assert_equal(nil,$Var)
163:   end
testMissingCodeRuby() click to toggle source

Test missing code for ruby

     # File test/SimpleUncomment/SimpleUncomment.rb, line 166
166:   def testMissingCodeRuby
167:     assert_raise(RCodeLeveler::ParseError) do
168:       requireFile('MissingCodeRuby')
169:     end
170:     assert_equal(nil,$Var)
171:   end
testMissingLevelCategory() click to toggle source

Test missing level for category

     # File test/SimpleUncomment/SimpleUncomment.rb, line 150
150:   def testMissingLevelCategory
151:     assert_raise(RCodeLeveler::ParseError) do
152:       requireFile('MissingLevelCategory')
153:     end
154:     assert_equal(nil,$Var)
155:   end
testMissingParameterDefault() click to toggle source

Test missing parameters for defaut

     # File test/SimpleUncomment/SimpleUncomment.rb, line 134
134:   def testMissingParameterDefault
135:     assert_raise(RCodeLeveler::ParseError) do
136:       requireFile('MissingParameterDefault')
137:     end
138:     assert_equal(nil,$Var)
139:   end
testMissingParametersCategory() click to toggle source

Test missing parameters for category

     # File test/SimpleUncomment/SimpleUncomment.rb, line 142
142:   def testMissingParametersCategory
143:     assert_raise(RCodeLeveler::ParseError) do
144:       requireFile('MissingParametersCategory')
145:     end
146:     assert_equal(nil,$Var)
147:   end
testRubyCategoryLevel2() click to toggle source
     # File test/SimpleUncomment/SimpleUncomment.rb, line 102
102:   def testRubyCategoryLevel2
103:     RCodeLeveler::setLevel(2,'MyCat')
104:     requireFile('RubyCategoryLevel')
105:     assert_equal(nil,$Var)
106:   end
testRubyCategoryLevel4() click to toggle source
     # File test/SimpleUncomment/SimpleUncomment.rb, line 107
107:   def testRubyCategoryLevel4
108:     RCodeLeveler::setLevel(4,'MyCat')
109:     requireFile('RubyCategoryLevel')
110:     assert_equal(1,$Var)
111:   end
testRubyComment() click to toggle source
    # File test/SimpleUncomment/SimpleUncomment.rb, line 85
85:   def testRubyComment
86:     $CondVar = false
87:     requireFile('Ruby')
88:     assert_equal(nil,$Var)
89:   end
testRubyDefaultLevel2() click to toggle source

Test accessing RCodeLeveler variables from ruby uncomment

    # File test/SimpleUncomment/SimpleUncomment.rb, line 92
92:   def testRubyDefaultLevel2
93:     RCodeLeveler::setLevel(2)
94:     requireFile('RubyDefaultLevel')
95:     assert_equal(nil,$Var)
96:   end
testRubyDefaultLevel4() click to toggle source
     # File test/SimpleUncomment/SimpleUncomment.rb, line 97
 97:   def testRubyDefaultLevel4
 98:     RCodeLeveler::setLevel(4)
 99:     requireFile('RubyDefaultLevel')
100:     assert_equal(1,$Var)
101:   end
testRubyUncomment() click to toggle source

Test ruby uncomment

    # File test/SimpleUncomment/SimpleUncomment.rb, line 80
80:   def testRubyUncomment
81:     $CondVar = true
82:     requireFile('Ruby')
83:     assert_equal(1,$Var)
84:   end
testSeveralNone() click to toggle source

Test several levels in the same file

     # File test/SimpleUncomment/SimpleUncomment.rb, line 114
114:   def testSeveralNone
115:     RCodeLeveler::setLevel(2)
116:     requireFile('Several')
117:     assert_equal(nil,$Var1)
118:     assert_equal(nil,$Var2)
119:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.