You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
garble/testdata/scripts
Daniel Martí cdac2cd3d6 testdata: avoid fmt in the implement test script
Like other tests, importing fmt results in quite a lot of extra work,
due to the lack of build caching.

In this particular test, we wanted fmt.Println so that T.String would be
called in an indirect way, without defining or referencing Stringer
interface in the main package.

We can do that by rolling our own "tinyfmt" package in a dozen or so
lines of code.

Below is how 'go test -short -vet=off -run Script/implement' is
affected, measured via benchcmd and benchstat:

	name                   old time/op         new time/op         delta
	GoTestScriptImplement          3.67s ± 9%          2.65s ±11%  -27.68%  (p=0.008 n=5+5)

	name                   old user-time/op    new user-time/op    delta
	GoTestScriptImplement          8.18s ± 4%          4.55s ± 9%  -44.35%  (p=0.008 n=5+5)

	name                   old sys-time/op     new sys-time/op     delta
	GoTestScriptImplement          1.27s ±12%          0.71s ±13%  -44.07%  (p=0.008 n=5+5)

	name                   old peak-RSS-bytes  new peak-RSS-bytes  delta
	GoTestScriptImplement          145MB ± 1%          145MB ± 2%     ~     (p=1.000 n=5+5)

All in all, we shave about one full second. It doesn't seem to affect
the total 'go test -short' noticeably, but every little bit counts.
5 years ago
..
asm.txt reduce unnecessary std imports in tests 5 years ago
basic.txt don't leak build version information via a const either 5 years ago
cgo.txt reduce unnecessary std imports in tests 5 years ago
debugdir.txt reuse a single 'go list -json -export -deps' call 5 years ago
help.txt simplify the main code flow somewhat 5 years ago
implement.txt testdata: avoid fmt in the implement test script 5 years ago
imports.txt keep build flags when calling 'go list' 5 years ago
ldflags.txt add a regression test for #82 5 years ago
literals.txt Randomize operator (xor, add, subtract) on all obfuscators (#90) 5 years ago
modinfo.txt reduce unnecessary std imports in tests 5 years ago
panic.txt add runtime API to suppress printing fatal errors 5 years ago
plugin.txt support building ad-hoc plugin packages 5 years ago
seed.txt make -seed=random use the same random seed for all packages 5 years ago
syntax.txt Only obfuscate required identifiers (#79) 5 years ago
test.txt testdata: add sections to scripts/test.txt 5 years ago