jack: (Default)
[personal profile] jack
The other thought that inspired the previous post is that I didn't have a good concept in my mind for a sort of assert I want sometimes, of something I don't expect to usually happen, or don't expect to happen in testing, even if it may happen in other scenarios.

Say "unrecognised parameter in config file" as exhibited in some bug in a computer game that turned off a lot of the ai for many of the enemies that people were talking about recently.

Or "needed to retry file access/memory allocation/etc". Or "input file size is more than 1Gb".

You don't necessarily want to treat those as failures, because they might happen in real life and if so, you want to deal with them. You don't want to stop the function at the point where they occur. But you sort of want to mark the behaviour somehow, because it will *usually* indicate a bug while developing.

I'm not sure how to think of these. Maybe "development only asserts"? Or "warnings which are not triggered, but counted and printed out at program termination during development and included with output of tests"?

Date: 2018-07-28 02:27 pm (UTC)
andrewducker: (Default)
From: [personal profile] andrewducker
Debug watnings?

Although actually, "Unrecognised parameter in config file" does sound like the kind of thing where the program should refuse to run until the config file is fixed.