Class TC_MysqlTime
In: test.rb
Parent: Test::Unit::TestCase

Methods

Public Instance methods

[Source]

      # File test.rb, line 1295
1295:   def setup()
1296:   end

[Source]

      # File test.rb, line 1297
1297:   def teardown()
1298:   end

[Source]

      # File test.rb, line 1324
1324:   def test_day()
1325:     t = Mysql::Time.new
1326:     assert_equal(23, t.day = 23)
1327:     assert_equal(23, t.day)
1328:   end

[Source]

      # File test.rb, line 1353
1353:   def test_eql()
1354:     t1 = Mysql::Time.new(2005,7,19,23,56,13)
1355:     t2 = Mysql::Time.new(2005,7,19,23,56,13)
1356:     assert_equal(t1, t2)
1357:   end

[Source]

      # File test.rb, line 1330
1330:   def test_hour()
1331:     t = Mysql::Time.new
1332:     assert_equal(15, t.hour = 15)
1333:     assert_equal(15, t.hour)
1334:   end

[Source]

      # File test.rb, line 1300
1300:   def test_init()
1301:     t = Mysql::Time.new
1302:     assert_equal(0, t.year);
1303:     assert_equal(0, t.month);
1304:     assert_equal(0, t.day);
1305:     assert_equal(0, t.hour);
1306:     assert_equal(0, t.minute);
1307:     assert_equal(0, t.second);
1308:     assert_equal(false, t.neg);
1309:     assert_equal(0, t.second_part);
1310:   end

[Source]

      # File test.rb, line 1336
1336:   def test_minute()
1337:     t = Mysql::Time.new
1338:     assert_equal(58, t.month = 58)
1339:     assert_equal(58, t.month)
1340:   end

[Source]

      # File test.rb, line 1318
1318:   def test_month()
1319:     t = Mysql::Time.new
1320:     assert_equal(11, t.month = 11)
1321:     assert_equal(11, t.month)
1322:   end

[Source]

      # File test.rb, line 1342
1342:   def test_second()
1343:     t = Mysql::Time.new
1344:     assert_equal(34, t.second = 34)
1345:     assert_equal(34, t.second)
1346:   end

[Source]

      # File test.rb, line 1348
1348:   def test_tos()
1349:     t = Mysql::Time.new(2005, 7, 19, 10, 15, 49)
1350:     assert_equal("2005-07-19 10:15:49", t.to_s)
1351:   end

[Source]

      # File test.rb, line 1312
1312:   def test_year()
1313:     t = Mysql::Time.new
1314:     assert_equal(2005, t.year = 2005)
1315:     assert_equal(2005, t.year)
1316:   end

[Validate]