gtestã§ã¯ãã¹ãã±ã¼ã¹æ¯ã«ããã¹ãã±ã¼ã¹å ¨ä½ã§å ±æãããªã½ã¼ã¹ãåæå(確ä¿)ã»è§£æ¾ããä»çµã¿ãæä¾ãã¦ãã*1ãããã¯ãSetUpTestCaseã¨TearDownTestCaseã使ç¨ãããã¨ã§å®ç¾ã§ããã ãµã³ãã«ã³ã¼ã class TestCase : public testing::Test { protected: static void SetUpTestCase() { // åæå } static void TearDownTestCase() { // è§£æ¾ } // SetUp, TearDownã¨ã®ä½µç¨ãå¯è½ static Type resource; // ãã¹ãã±ã¼ã¹å ¨ä½ã§å ±æããããªã½ã¼ã¹(staticã¡ã³ãã«ãããã¨) }; Type TestCase::resource = hogehoge; TEST_F(TestCase, test1) {} T
{{#tags}}- {{label}}
{{/tags}}