Skip to content

Commit cb26639

Browse files
authored
Merge pull request #530 from mtconnect/528_issue_converting_kw_h_to_w_s
528 issue converting kw h to w s
2 parents 70715a5 + 8eb5c38 commit cb26639

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test_package/unit_conversion_test.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,10 @@ TEST(UnitConversionTest, test_volume_and_volume_per_time)
136136
conv = UnitConversion::make("GALLON/MINUTE", "LITER/SECOND");
137137
EXPECT_NEAR(1.0725, conv->convert(17.0), 0.001);
138138
}
139+
140+
TEST(UnitConversionTest, check_conversion_from_kw_h_to_watt_second)
141+
{
142+
auto conv = UnitConversion::make("KILOWATT/HOUR", "WATT/SECOND");
143+
EXPECT_NEAR(0.16666, conv->convert(0.6), 0.001);
144+
EXPECT_NEAR(0.25556, conv->convert(0.92), 0.001);
145+
}

0 commit comments

Comments
 (0)