本文整理汇总了C++中openstudio::createBTUEnergy方法的典型用法代码示例。如果您正苦于以下问题:C++ openstudio::createBTUEnergy方法的具体用法?C++ openstudio::createBTUEnergy怎么用?C++ openstudio::createBTUEnergy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类openstudio
的用法示例。
在下文中一共展示了openstudio::createBTUEnergy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createBTULength
TEST_F(UnitsFixture,BTUUnit_CreateFunctions)
{
BTUUnit u;
u = createBTULength();
EXPECT_EQ(1,u.baseUnitExponent("ft"));
EXPECT_EQ(0,u.scale().exponent);
EXPECT_EQ("ft",u.standardString(false));
EXPECT_EQ("",u.prettyString());
u = createBTUTime();
EXPECT_EQ(1,u.baseUnitExponent("h"));
EXPECT_EQ(0,u.scale().exponent);
EXPECT_EQ("h",u.standardString(false));
EXPECT_EQ("",u.prettyString());
u = createBTUTemperature();
EXPECT_EQ(1,u.baseUnitExponent("R"));
EXPECT_EQ(0,u.scale().exponent);
EXPECT_EQ("R",u.standardString(false));
EXPECT_EQ("",u.prettyString());
u = createBTUPeople();
EXPECT_EQ(1,u.baseUnitExponent("people"));
EXPECT_EQ(0,u.scale().exponent);
EXPECT_EQ("people",u.standardString(false));
EXPECT_EQ("",u.prettyString());
u.pow(-1);
EXPECT_EQ("1/person",u.standardString(false));
u = createBTUEnergy();
EXPECT_EQ(0,u.scale().exponent);
EXPECT_EQ("Btu",u.standardString(false));
EXPECT_EQ("",u.prettyString());
u = createBTUPower();
EXPECT_EQ(0,u.scale().exponent);
EXPECT_EQ("Btu/h",u.standardString(false));
EXPECT_EQ("",u.prettyString());
}