# Copyright (C) 2015-2016 all contributors # License: GPL-3.0+ # frozen_string_literal: true require './test/helper' require 'dtas/parse_freq' class TestParseFreq < Testcase include DTAS::ParseFreq def test_parse_freq assert_equal(4000, parse_freq('4k')) assert_equal(-4000, parse_freq('-4k')) assert_equal(-4900, parse_freq('-4.9k')) assert_equal(-4900, parse_freq('-4.9k', :int)) assert_equal(4900.5, parse_freq('4.9005k', :float)) end end