From d801a630311ce9cf5a2a1ef4653d3f53a33b4923 Mon Sep 17 00:00:00 2001 From: Takashi Sawanaka Date: Sat, 25 Jul 2020 19:49:17 +0900 Subject: [PATCH] Test.cpp: Prevent the message box from displaying and stopping the test --- Src/Test.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Src/Test.cpp b/Src/Test.cpp index c9215746e..466705359 100644 --- a/Src/Test.cpp +++ b/Src/Test.cpp @@ -87,7 +87,7 @@ TEST(SyntaxHighlight, Verilog) paths::ConcatPath(projectRoot, L"Testing/FileFormats/Verilog.v"), paths::ConcatPath(projectRoot, L"Testing/FileFormats/Verilog.v") }; - CMessageBoxDialog dlg(nullptr, IDS_FILESSAME, 0U, 0U, IDS_FILESSAME); + CMessageBoxDialog dlg(nullptr, IDS_FILE_TO_ITSELF, 0U, 0U, IDS_FILE_TO_ITSELF); const int nPrevFormerResult = dlg.SetFormerResult(IDOK); EXPECT_TRUE(GetMainFrame()->DoFileOpen(&tFiles)); CFrameWnd *pFrame = GetMainFrame()->GetActiveFrame(); @@ -114,7 +114,7 @@ TEST(SyntaxHighlight, Verilog) TEST(FileCompare, FindText) { String projectRoot = getProjectRoot(); - CMessageBoxDialog dlg(nullptr, IDS_FILESSAME, 0U, 0U, IDS_FILESSAME); + CMessageBoxDialog dlg(nullptr, IDS_FILE_TO_ITSELF, 0U, 0U, IDS_FILE_TO_ITSELF); const int nPrevFormerResult = dlg.SetFormerResult(IDOK); CMergeDoc *pDoc = nullptr; CFrameWnd *pFrame = nullptr; @@ -205,7 +205,9 @@ TEST(FileCompare, LastLineEOL) _T("2-3CRLF.txt") }; CMessageBoxDialog dlg(nullptr, IDS_FILESSAME, 0U, 0U, IDS_FILESSAME); + CMessageBoxDialog dlg2(nullptr, IDS_FILE_TO_ITSELF, 0U, 0U, IDS_FILE_TO_ITSELF); const int nPrevFormerResult = dlg.SetFormerResult(IDOK); + const int nPrevFormerResult2 = dlg2.SetFormerResult(IDOK); CMergeDoc *pDoc = nullptr; CFrameWnd *pFrame = nullptr; for (bool bIgnoreBlankLines: { true, false }) @@ -283,6 +285,7 @@ TEST(FileCompare, LastLineEOL) } pFrame->PostMessage(WM_CLOSE); dlg.SetFormerResult(nPrevFormerResult); + dlg2.SetFormerResult(nPrevFormerResult2); } TEST(FolderCompare, IgnoreEOL) -- 2.11.0