summaryrefslogtreecommitdiffstats
path: root/test/utility_test.rb
blob: 2de6c8928439f0fa526d203614ace654a08d6ecf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require 'test_helper'

class UtilityTest < Test::Unit::TestCase
  include HCl::Utility

  def test_time2float_decimal
    assert_equal 2.5, time2float("2.5")
  end

  def test_time2float_hhmm
    assert_equal 2.5, time2float("2:30")
  end

  def test_time2float_assume_decimal
    assert_equal 2.0, time2float("2")
  end
end