0

I have a series of Google Unit Tests that are launched via a bat file. Some of these tests are broken and a window appears when they run:

Microsoft Visual C++ Debug Library
Debug Error! 
  ... Info about error

This window waits for a user to press Abort, Retry, Ignore. Of course, this halts my test. Currently, I delete the broken tests before I run the batch. I want a way to force this window to abort or ignore - so I don't need to skip the broken tests.

This problem is similar to; however, I cannot write to reg keys How do I disable the 'Debug / Close Application' dialog on Windows Vista?

Update: My manager says this window might not appear if this project was in release. Trying to do that now. However, if there is a solution besides changing my project to release, I would appreciate it! :D

Community
  • 1
  • 1
Kat
  • 447
  • 2
  • 7
  • 21
  • Does this answer your question? [Windows CRT and assert reporting (abort,retry,ignore)](https://stackoverflow.com/questions/1121698/windows-crt-and-assert-reporting-abort-retry-ignore) – halt9k Mar 24 '23 at 16:53

1 Answers1

-1

That's what you get from a failed assert() in the source code. Useful to debug the test. But actually running unit tests against code that was compiled in the Debug configuration is not useful. Your customer isn't going to run the Debug build either.

Only test the Release build, that disables those assert() calls as well.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
  • Thank you for the answer. I updated my project from Debug to Release. However, a new window appears - " has encountered a problem and need to close. We are sorry for the inconvenience." - with "debug", "send error report", and "don't send" as a selection. So the problem still stands. :( – Kat Jun 13 '13 at 17:29
  • This is not untypical for what happens when you ignore an assert(). The program will crash. You could call that "test failed", write a bug report and send it back to the programmer. Or you flubbed your test code, ask somebody in your company to help you out. We can't see the code from here. – Hans Passant Jun 13 '13 at 17:40