Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions test/runnable/test_cdstrpar.d
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// REQUIRED_ARGS: -O
// REQUIRED_ARGS: -O -fPIC
// PERMUTE_ARGS:
// only testing on SYSV-ABI, but backend code is identical across platforms
// DISABLED: win32 win64 osx linux32 freebsd32
debug = PRINTF;
debug (PRINTF) import core.stdc.stdio;

// Run this after codegen changes:
// env DMD=generated/linux/release/64/dmd rdmd -version=update test/runnable/test_cdstrpar.d
// env DMD=generated/linux/release/64/dmd rdmd -fPIC -version=update test/runnable/test_cdstrpar.d
version (update)
{
import std.algorithm : canFind, find, splitter, until;
Expand Down Expand Up @@ -76,8 +76,8 @@ version (update)
auto content = src.readText;
auto f = File(src, "w");
auto orng = f.lockingTextWriter;
immutable string start = "// begin";
immutable string end = "// end";
immutable string start = "// dfmt off";
immutable string end = "// dfmt on";
replaceFirstInto!((_, orng) => formattedWrite(orng, start ~ "\n%s" ~ end, sink.data))(orng,
content, ctRegex!(`^` ~ start ~ `[^$]*` ~ end ~ `$`, "m"));
}
Expand Down Expand Up @@ -118,7 +118,6 @@ struct Code(T_, int N_)
alias AliasSeq(Args...) = Args;

// dfmt off
// begin
alias baselineCases = AliasSeq!(
Code!(ubyte, 4)([
/* push rbp */ 0x55,
Expand Down Expand Up @@ -209,7 +208,6 @@ alias baselineCases = AliasSeq!(
]),
);

// end
// dfmt on

bool matches(const(ubyte)[] code, const(ubyte)[] exp)
Expand Down
Loading