AK+Kernel: Print TODO when a TODO() is executed
Previously we would just print "ASSERTION FAILED: false", which was kinda cryptic and also didn't make it clear whether this was a TODO or an unreachable condition. Now, we actually print "ASSERTION FAILED: TODO", making it crystal clear.
This commit is contained in:
parent
e500b39e47
commit
bed51d856a
Notes:
sideshowbarker
2024-07-18 07:30:52 +09:00
Author: https://github.com/sin-ack Commit: https://github.com/SerenityOS/serenity/commit/bed51d856a5 Pull-request: https://github.com/SerenityOS/serenity/pull/9195
2 changed files with 5 additions and 2 deletions
|
@ -12,5 +12,6 @@
|
|||
# include <assert.h>
|
||||
# define VERIFY assert
|
||||
# define VERIFY_NOT_REACHED() assert(false)
|
||||
# define TODO VERIFY_NOT_REACHED
|
||||
static constexpr bool TODO = false;
|
||||
# define TODO() VERIFY(TODO)
|
||||
#endif
|
||||
|
|
|
@ -25,4 +25,6 @@ extern "C" {
|
|||
|
||||
#define VERIFY_INTERRUPTS_DISABLED() VERIFY(!(cpu_flags() & 0x200))
|
||||
#define VERIFY_INTERRUPTS_ENABLED() VERIFY(cpu_flags() & 0x200)
|
||||
#define TODO VERIFY_NOT_REACHED
|
||||
|
||||
static constexpr bool TODO = false;
|
||||
#define TODO() VERIFY(TODO)
|
||||
|
|
Loading…
Add table
Reference in a new issue