4#include <gtest/gtest.h>
18 EXPECT_STREQ(
"-Wfoo", Diag::ChangeState(
"-Wfoo", Diag::State::flag, Diag::State::option).c_str());
19 EXPECT_STREQ(
"-Wfoo", Diag::ChangeState(
"-Wfoo", Diag::State::flag, Diag::State::ignored).c_str());
20 EXPECT_STREQ(
"-Wfoo", Diag::ChangeState(
"-Wfoo", Diag::State::flag, Diag::State::error).c_str());
21 EXPECT_STREQ(
"-Wfoo", Diag::ChangeState(
"-Wfoo", Diag::State::flag, Diag::State::warning).c_str());
23 EXPECT_STREQ(
"-Wfoo", Diag::ChangeState(
"-Wfoo", Diag::State::option, Diag::State::option).c_str());
24 EXPECT_STREQ(
"-Wno-foo", Diag::ChangeState(
"-Wfoo", Diag::State::option, Diag::State::ignored).c_str());
25 EXPECT_STREQ(
"-Wfoo", Diag::ChangeState(
"-Wfoo", Diag::State::option, Diag::State::error).c_str());
26 EXPECT_STREQ(
"-Wfoo", Diag::ChangeState(
"-Wfoo", Diag::State::option, Diag::State::warning).c_str());
28 EXPECT_STREQ(
"-Wfoo", Diag::ChangeState(
"-Wfoo", Diag::State::ignored, Diag::State::option).c_str());
29 EXPECT_STREQ(
"-Wno-foo", Diag::ChangeState(
"-Wfoo", Diag::State::ignored, Diag::State::ignored).c_str());
30 EXPECT_STREQ(
"-Werror=foo", Diag::ChangeState(
"-Wfoo", Diag::State::ignored, Diag::State::error).c_str());
31 EXPECT_STREQ(
"-Wno-error=foo", Diag::ChangeState(
"-Wfoo", Diag::State::ignored, Diag::State::warning).c_str());
33 EXPECT_STREQ(
"-Wfoo", Diag::ChangeState(
"-Wfoo", Diag::State::warning, Diag::State::option).c_str());
34 EXPECT_STREQ(
"-Wno-foo", Diag::ChangeState(
"-Wfoo", Diag::State::warning, Diag::State::ignored).c_str());
35 EXPECT_STREQ(
"-Werror=foo", Diag::ChangeState(
"-Wfoo", Diag::State::warning, Diag::State::error).c_str());
36 EXPECT_STREQ(
"-Wno-error=foo", Diag::ChangeState(
"-Wfoo", Diag::State::warning, Diag::State::warning).c_str());
38 EXPECT_STREQ(
"-Wfoo", Diag::ChangeState(
"-Wfoo", Diag::State::error, Diag::State::option).c_str());
39 EXPECT_STREQ(
"-Wno-foo", Diag::ChangeState(
"-Wfoo", Diag::State::error, Diag::State::ignored).c_str());
40 EXPECT_STREQ(
"-Werror=foo", Diag::ChangeState(
"-Wfoo", Diag::State::error, Diag::State::error).c_str());
41 EXPECT_STREQ(
"-Wno-error=foo", Diag::ChangeState(
"-Wfoo", Diag::State::error, Diag::State::warning).c_str());