mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Asserts are retained regardless of optimization when running tests.
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
- Crash when reading an empty 'manifest.json'.
|
||||
- "optsize" did not work correctly in project.json.
|
||||
- `l[0].a = 1` now supported for overloads due to better lvalue handling #1357.
|
||||
- Asserts are retained regardless of optimization when running tests.
|
||||
|
||||
### Stdlib changes
|
||||
- Additional init functions for hashmap.
|
||||
|
||||
@@ -1176,7 +1176,7 @@ static inline void llvm_emit_assert_stmt(GenContext *c, Ast *ast)
|
||||
{
|
||||
ExprId exprid = ast->assert_stmt.expr;
|
||||
Expr *assert_expr = exprptr(exprid);
|
||||
if (safe_mode_enabled())
|
||||
if (safe_mode_enabled() || compiler.build.testing)
|
||||
{
|
||||
BEValue value;
|
||||
llvm_emit_expr(c, &value, assert_expr);
|
||||
|
||||
Reference in New Issue
Block a user