0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/src
Andrew Kelley c2db077574
std.debug.assert: remove special case for test builds
Previously, std.debug.assert would `@panic` in test builds,
if the assertion failed. Now, it's always `unreachable`.

This makes release mode test builds more accurately test
the actual code that will be run.

However this requires tests to call `std.testing.expect`
rather than `std.debug.assert` to make sure output is correct.

Here is the explanation of when to use either one, copied from
the assert doc comments:

Inside a test block, it is best to use the `std.testing` module
rather than assert, because assert may not detect a test failure
in ReleaseFast and ReleaseSafe mode. Outside of a test block, assert
is the correct function to use.

closes #1304
History 2019-02-08 18:23:38 -05:00
..
all_types.hpp fix using the result of @intCast to u0 2019-02-07 16:02:45 -05:00
analyze.cpp Merge pull request #1924 from ziglang/tls 2019-02-06 20:21:13 -05:00
analyze.hpp thread local storage working for linux x86_64 2019-02-06 13:48:04 -05:00
ast_render.cpp thread local storage working for linux x86_64 2019-02-06 13:48:04 -05:00
ast_render.hpp rewrite parseh to use AST instead of direct types 2017-09-02 04:11:23 -04:00
bigfloat.cpp add f16 type 2018-06-27 16:20:04 +02:00
bigfloat.hpp add f16 type 2018-06-27 16:20:04 +02:00
bigint.cpp @bitreverse intrinsic, part of #767 (#1865) 2019-01-02 16:47:47 -05:00
bigint.hpp add @popCount intrinsic 2018-07-07 00:25:32 -04:00
blake2.h stage1: import blake2b implementation 2018-09-05 23:23:11 -04:00
blake2b.c stage1: build blake code with -std=c99 2018-09-11 17:29:18 -04:00
buffer.cpp the same string literal codegens to the same constant 2018-01-11 21:02:30 -05:00
buffer.hpp Crash fixes and small improvements to inline asm. (#1756) 2018-11-19 16:22:21 -05:00
c_tokenizer.cpp translate-c: refactor prefix and suffix op C macro parsing 2017-12-07 11:52:52 -05:00
c_tokenizer.hpp translate-c: refactor prefix and suffix op C macro parsing 2017-12-07 11:52:52 -05:00
cache_hash.cpp collapse os_file_mtime into os_file_open_r and check for directory 2019-01-30 16:06:18 -05:00
cache_hash.hpp bring back zig-cache 2018-09-11 22:25:52 -04:00
codegen.cpp fix using the result of @intCast to u0 2019-02-07 16:02:45 -05:00
codegen.hpp require running std lib tests coherently 2019-02-06 14:32:20 -05:00
compiler.cpp remove zig build --init. add zig init-lib and zig init-exe 2018-09-17 17:11:18 -04:00
compiler.hpp remove zig build --init. add zig init-lib and zig init-exe 2018-09-17 17:11:18 -04:00
config.h.in find libc and zig std lib at runtime 2018-03-30 17:10:54 -04:00
errmsg.cpp Fix the color of compiler messages for light-themed terminal. 2017-12-04 19:22:34 +09:00
errmsg.hpp use size_t for indexes 2016-09-19 11:54:01 -04:00
error.cpp stage1: better file path handling 2018-11-26 20:04:35 -05:00
error.hpp stage1: better file path handling 2018-11-26 20:04:35 -05:00
hash_map.hpp rewrite scope implementation 2016-12-01 21:08:12 -05:00
ir.cpp std.debug.assert: remove special case for test builds 2019-02-08 18:23:38 -05:00
ir.hpp backport copy elision changes 2019-01-29 22:30:30 -05:00
ir_print.cpp fix using the result of @intCast to u0 2019-02-07 16:02:45 -05:00
ir_print.hpp make undefined as a constant value lazy 2017-04-23 14:34:40 -04:00
link.cpp require running std lib tests coherently 2019-02-06 14:32:20 -05:00
list.hpp fix some -Wconversion errors 2017-04-10 20:02:39 -04:00
main.cpp require running std lib tests coherently 2019-02-06 14:32:20 -05:00
os.cpp os.cpp: fix regression on Windows from 59c050e7 2019-01-31 16:52:59 -05:00
os.hpp collapse os_file_mtime into os_file_open_r and check for directory 2019-01-30 16:06:18 -05:00
parser.cpp thread local storage working for linux x86_64 2019-02-06 13:48:04 -05:00
parser.hpp New Zig formal grammar (#1685) 2018-11-13 05:08:37 -08:00
range_set.cpp better bigint/bigfloat implementation 2017-07-08 17:59:10 -04:00
range_set.hpp better bigint/bigfloat implementation 2017-07-08 17:59:10 -04:00
softfloat.hpp depend on embedded SoftFloat-3d instead of __float128 2017-09-14 01:46:47 -04:00
target.cpp fixups 2018-12-26 15:25:54 -05:00
target.hpp fixups 2018-12-26 15:25:54 -05:00
tokenizer.cpp thread local storage working for linux x86_64 2019-02-06 13:48:04 -05:00
tokenizer.hpp thread local storage working for linux x86_64 2019-02-06 13:48:04 -05:00
translate_c.cpp fixups 2018-12-26 15:25:54 -05:00
translate_c.hpp limit integer types to maximum bit width of 65535 2018-11-06 11:09:14 -05:00
util.cpp tier 2 support for freebsd 2018-11-27 20:56:43 -05:00
util.hpp Crash fixes and small improvements to inline asm. (#1756) 2018-11-19 16:22:21 -05:00
windows_com.hpp compiling on mingw is now supported (#1542) 2018-09-18 00:13:17 -04:00
windows_sdk.cpp fixed mingw compilation 2018-10-27 11:35:01 -04:00
windows_sdk.h self-hosted: add first compare-output test 2018-07-23 00:35:53 -04:00
zig_llvm.cpp fix vector debug info tripping LLVM assertion 2019-02-04 22:16:16 -05:00
zig_llvm.h fix vector debug info tripping LLVM assertion 2019-02-04 22:16:16 -05:00