コード例 #1
0
ファイル: TestLevel.cpp プロジェクト: QRayarch/DinoLasers
Level* TestLevel::NextLevel() {
    if (needLoad) {
        int s = 0;
        Score* score = dino->GetComponent<Score>();
        if (score != nullptr) {
            s = score->GetScore();
        }
        return new EndScreen(s);
    }
    return this;
}
コード例 #2
0
ファイル: Score_unittest.cpp プロジェクト: tgittos/breakout
TEST(ScoreTest, ListensForBrickHitEvents) {
  Score s;
  s.Increment(Brick::FIVE_POINTS);
  ASSERT_EQ(5, s.GetScore());
}
コード例 #3
0
ファイル: Score_unittest.cpp プロジェクト: tgittos/breakout
TEST(ScoreTest, ValidInitialization) {
  Score s;
  ASSERT_EQ(0, s.GetScore());
}