Skip to content

Commit

Permalink
Merge pull request sakura-editor#905 from m-tmatma/feature/fix-mismat…
Browse files Browse the repository at this point in the history
…ch-test-count

sakura-editor#877 で導入した単体テストで DISABLED テストを実装
  • Loading branch information
m-tmatma committed May 18, 2019
2 parents e31c6ce + eb26573 commit 93b0679
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/unittests/test-mydevmode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ TEST(MYDEVMODETest, operatorNotEqual)

/* アクセス不可のメモリ領域にアクセスしても、例外が発生しない事象があるので、
* 当面MSVCのリリース版では以下のテストを実行しない。
*
* 参考: https://github.com/google/googletest/blob/9d4cde44a4a3952cf21861f9370b3bed9265dfd7/googletest/docs/advanced.md#temporarily-disabling-tests
*/
#if defined(_DEBUG) || defined(__MINGW64__)
/*!
Expand All @@ -269,6 +271,9 @@ TEST(MYDEVMODETest, operatorNotEqual)
* 実際にどういうケースで一般保護例外違反となるか、コード的に発生させる方法の共有を兼ねて実装したもの。
*/
TEST(MYDEVMODETest, StrategyForSegmentationFault)
#else
TEST(MYDEVMODETest, DISABLED_StrategyForSegmentationFault)
#endif /* if defined(_DEBUG) || defined(__MINGW64__) */
{
// システムのページサイズを取得する
SYSTEM_INFO systemInfo = { 0 };
Expand Down Expand Up @@ -315,4 +320,3 @@ TEST(MYDEVMODETest, StrategyForSegmentationFault)
// 仮想メモリ範囲を解放する。
::VirtualFree(memBlock1, 0, MEM_RELEASE);
}
#endif /* if defined(_DEBUG) || defined(__MINGW64__) */

0 comments on commit 93b0679

Please sign in to comment.