MCPcopy Create free account
hub / github.com/KLayout/klayout / test_19

Method test_19

testdata/ruby/basic_testcore.rb:1156–1203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1154 end
1155
1156 def test_19
1157
1158 c0 = RBA::C.new
1159 assert_equal( c0.g("x"), 1977 );
1160
1161 c1 = C_IMP1.new
1162 assert_equal( c1.g("x"), 615 );
1163
1164 c2 = C_IMP2.new
1165 assert_equal( c2.g("x"), 1 );
1166 assert_equal( c2.g(""), 0 );
1167 assert_equal( c2.g("abc"), 3 );
1168 assert_equal( c1.g("x"), 615 );
1169
1170 c3 = C_IMP3.new
1171 assert_equal( c3.g("x"), 1977 );
1172
1173 assert_equal( RBA::C.s1, 4451 );
1174 RBA::C.s2clr
1175 RBA::C.s2( 7.0 )
1176 assert_equal( RBA::C.s3( 5.5 ), "5.500" );
1177
1178 arr = []
1179 RBA::C.each { |i| arr.push i }
1180 assert_equal( arr, [ 0, 1, 2, 3, 4, 5, 6 ] )
1181
1182 assert_equal( C_IMP1.s1, 4451 );
1183 C_IMP1.s2( 1.0 )
1184 assert_equal( C_IMP1.s3( 1.5 ), "1.500" );
1185
1186 arr = []
1187 C_IMP1.each { |i| arr.push i }
1188 assert_equal( arr, [ 0, 1, 2, 3, 4, 5, 6, 0 ] )
1189
1190 assert_equal( C_IMP2.s1, 4451 );
1191 C_IMP2.s2( 2.0 )
1192 assert_equal( C_IMP2.s3( -1.5 ), "-1.500" );
1193
1194 arr = []
1195 C_IMP2.each { |i| arr.push i }
1196 assert_equal( arr, [ 0, 1, 2, 3, 4, 5, 6, 0, 0, 1 ] )
1197
1198 c4 = C_IMP4.new
1199 c4.call_vfunc(RBA::CopyDetector::new(17))
1200 assert_equal(c4.x, 17)
1201 assert_equal(c4.xx, 17)
1202
1203 end
1204
1205 def test_20
1206

Callers

nothing calls this directly

Calls 10

s2clrMethod · 0.80
eachMethod · 0.80
call_vfuncMethod · 0.80
gMethod · 0.45
s1Method · 0.45
s2Method · 0.45
s3Method · 0.45
pushMethod · 0.45
xMethod · 0.45
xxMethod · 0.45

Tested by

no test coverage detected