At this time, the test case fails.
Change-Id: I4104111532b51f01e92849d51ee57fdac5e0631a
namespace display_server
{
-DSOutput::DSOutput() : resolutionWidth(1280), resolutionHeight(720)
+DSOutput::DSOutput()
+ : __resolutionWidth(0),
+ __resolutionHeight(0)
{}
DSOutput::~DSOutput()
int DSOutput::getResolutionWidth()
{
- return resolutionWidth;
+ return __resolutionWidth;
}
int DSOutput::getResolutionHeight()
{
- return resolutionHeight;
+ return __resolutionHeight;
}
+
+bool DSOutput::applyResolutionAuto()
+{
+ return false;
+}
+
} // namespace display_server
namespace display_server
{
+
class DSOutput
{
public:
DSOutput();
virtual ~DSOutput();
+
int getResolutionWidth();
int getResolutionHeight();
+ bool applyResolutionAuto();
private:
- int resolutionWidth;
- int resolutionHeight;
+ int __resolutionWidth;
+ int __resolutionHeight;
};
+
}
#endif
ASSERT_TRUE(true);
}
-TEST_F(DSOutputTest, GetResolutionWidthHeight)
+TEST_F(DSOutputTest, BasicMethods)
{
- DSOutput *output = new DSOutput;
-
- int width = output->getResolutionWidth();
- EXPECT_TRUE(width == 1280);
- int height = output->getResolutionHeight();
- EXPECT_TRUE(height == 720);
+ DSOutput output;
- delete output;
+ EXPECT_TRUE(output.getResolutionWidth() != 0);
+ EXPECT_TRUE(output.getResolutionHeight() != 0);
+ EXPECT_TRUE(output.applyResolutionAuto() == true);
}