public void GetMessage_AllFit() { var expectedMsg = string.Format( @"Assertion failed! Program: {0} File: bla.cpp Line: 583 Expression: The expression that failed For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts (Press Retry to debug the application - JIT must be enabled)", ExecutableName); using (var debugProcs = new DummyDebugProcs()) { Assert.AreEqual(expectedMsg, debugProcs.CallGetMessage("The expression that failed", "bla.cpp", 583)); } }
public void GetMessage_FilenameToLong() { var expectedMsg = string.Format( @"Assertion failed! Program: {0} File: /path/with_a_ver...have_to_truncate_before_it_fits.cpp Line: 583 Expression: The expression that failed For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts (Press Retry to debug the application - JIT must be enabled)", ExecutableName); using (var debugProcs = new DummyDebugProcs()) { Assert.AreEqual(expectedMsg, debugProcs.CallGetMessage("The expression that failed", "/path/with_a_very_long_filename_that_we_have_to_truncate_before_it_fits.cpp", 583)); } }
public void GetMessage_PathAndFilenameToLong() { var expectedMsg = string.Format( @"Assertion failed! Program: {0} File: /path/that/has/too/many/character...with_lon...ame.cpp Line: 123 Expression: The expression that failed For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts (Press Retry to debug the application - JIT must be enabled)", ExecutableName); using (var debugProcs = new DummyDebugProcs()) { Assert.AreEqual(expectedMsg, debugProcs.CallGetMessage("The expression that failed", "/path/that/has/too/many/characters/in/it/with_long_filename.cpp", 123)); } }
public void GetMessage_PathToLong() { var expectedMsg = string.Format( @"Assertion failed! Program: {0} File: /this/is/a/very/long/path/that/extends...{1}truncate.cpp Line: 583 Expression: The expression that failed For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts (Press Retry to debug the application - JIT must be enabled)", ExecutableName, Path.DirectorySeparatorChar); using (var debugProcs = new DummyDebugProcs()) { Assert.AreEqual(expectedMsg, debugProcs.CallGetMessage("The expression that failed", "/this/is/a/very/long/path/that/extends/beyond/sixty/characters/so/that/we/have/to/truncate.cpp", 583)); } }