Created
December 20, 2013 08:40
-
-
Save raimusyndrome/8052017 to your computer and use it in GitHub Desktop.
GoogleTestを使用する場合のmain関数のテンプレート
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <gtest/gtest.h> | |
class CustomEnvironment : | |
public ::testing::Environment | |
{ | |
public: | |
virtual ~CustomEnvironment() {} | |
// 環境の初期化方法を定義するには,これをオーバーライドしてください. | |
virtual void SetUp() { | |
} | |
// 環境の終了処理を定義するには,これをオーバーライドしてください. | |
virtual void TearDown() { | |
} | |
}; | |
int main(int argc, char* argv[]){ | |
testing::InitGoogleTest(&argc, argv); | |
//::testing::AddGlobalTestEnvironment(new CustomEnvironment()); | |
return RUN_ALL_TESTS(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment