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í e2a32634a6
simplify, improve, and test line obfuscation (#239)
First, remove the shuffling of the declarations list within each file.
This is what we used at the very start to shuffle positions. Ever since
we started obfuscating positions via //line comments, that has been
entirely unnecessary.

Second, add a proper test that will fail if we don't obfuscate line
numbers well enough. Filenames were already decently covered by other
tests.

Third, simplify the line obfuscation code. It does not require
astutil.Apply, and ranging over file.Decls is easier.

Finally, also obfuscate the position of top-level vars, since we only
used to do it for top-level funcs. Without that fix, the test would fail
as varLines was unexpectedly sorted.
4 years ago
..
asm.txt testdata: don't let tests rely on rewriting mod files 5 years ago
basic.txt obfuscate unexported names like exported ones (#227) 4 years ago
cgo.txt testdata: don't let tests rely on rewriting mod files 5 years ago
debugdir.txt testdata: don't let tests rely on rewriting mod files 5 years ago
goprivate.txt support typechecking all of std (#236) 4 years ago
goversion.txt testdata: simplify goversion test (#232) 4 years ago
help.txt include a "garble version" test (#221) 4 years ago
implement.txt testdata: don't let tests rely on rewriting mod files 5 years ago
imports.txt make the handling of import paths more robust 4 years ago
init.txt testdata: add test case for init funcs in many files (#208) 4 years ago
ldflags.txt testdata: don't let tests rely on rewriting mod files 5 years ago
linkname.txt fixed some bugs related to additional linkname corner cases (#210) 4 years ago
literals.txt do not try to obfuscate huge literals (#204) 4 years ago
modinfo.txt testdata: don't let tests rely on rewriting mod files 5 years ago
plugin.txt testdata: don't let tests rely on rewriting mod files 5 years ago
position.txt simplify, improve, and test line obfuscation (#239) 4 years ago
reverse.txt reverse: support unexported names and package paths (#233) 4 years ago
seed.txt testdata: don't let tests rely on rewriting mod files 5 years ago
syntax.txt avoid panic on funcs that almost look like tests (#235) 4 years ago
test.txt testdata: don't let tests rely on rewriting mod files 5 years ago
tiny.txt testdata: don't let tests rely on rewriting mod files 5 years ago