mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 17:40:27 +00:00
6560116b67
Instead of aborting the program when we hit an assertion, just print a message and keep going. This allows us to write tests that provoke assertions on purpose.
24 lines
383 B
C++
24 lines
383 B
C++
#pragma once
|
|
|
|
#ifndef AK_TEST_SUITE
|
|
|
|
#ifdef KERNEL
|
|
# include <Kernel/Assertions.h>
|
|
#else
|
|
# include <assert.h>
|
|
# ifndef __serenity__
|
|
# define ASSERT assert
|
|
# define ASSERT_NOT_REACHED() assert(false)
|
|
# define RELEASE_ASSERT assert
|
|
# endif
|
|
#endif
|
|
|
|
#endif
|
|
|
|
namespace AK {
|
|
|
|
inline void not_implemented() { ASSERT(false); }
|
|
|
|
}
|
|
|
|
using AK::not_implemented;
|