diff options
| author | Ryan Liptak <squeek502@hotmail.com> | 2022-12-14 21:30:35 -0800 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-12-15 05:13:21 -0500 |
| commit | 077b003c50065a8b193dcad793ca5c4474222af6 (patch) | |
| tree | c30a616f3130b2ed70ddfb418bf28e36ec15ad0a /src/codegen/llvm.zig | |
| parent | 88d927a511922efd82c4ec862c8e2aa83df84391 (diff) | |
| download | zig-077b003c50065a8b193dcad793ca5c4474222af6.tar.gz zig-077b003c50065a8b193dcad793ca5c4474222af6.zip | |
std.compress: Improve tests, remove reliance on openDirAbsolute
- Previously, some of the compress tests used `@src()` in combination with `dirname` and `openDirAbsolute` to read test files at runtime, which both excludes platforms that `openDirAbsolute` is not implemented for (WASI) and platforms that `SourceLocation.file` is not absolute (this was true for me locally on Windows). Instead of converting the tests to use `fs.cwd().openDir`, they have been converted to use `@embedFile` to avoid any potential problems with the runtime cwd.
- In order to use `@embedFile`, some of the `[]u8` parameters needed to be changed to `[]const u8`; none of them needed to be non-const anyway
- The tests now use `expectEqual` and `expectEqualSlices` where appropriate for better diagnostics
Diffstat (limited to 'src/codegen/llvm.zig')
0 files changed, 0 insertions, 0 deletions
