Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: check initOf and codeOf reachability #2083

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"src/test/exit-codes/contracts/compute-phase-errors.tact",
"src/test/e2e-emulated/map-tests/build",
"src/test/e2e-emulated/map-tests/map-properties-key-value-types.ts",
"src/test/autogenerated/minimal-fc-stdlib/stdlib.fc",
"/docs",
"src/benchmarks/contracts/func/notcoin/stdlib-custom.fc",
"src/benchmarks/contracts/func/notcoin/gas.fc"
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"postpack": "pinst --enable",
"next-version": "ts-node version.build.ts",
"random-ast": "ts-node ./src/ast/random-ast.ts",
"gen-initof-tests": "ts-node ./src/test/autogenerated/gen-initof-reachability.ts",
"top10": "find . -type f -exec du -h {} + | sort -rh | head -n 10"
},
"files": [
Expand Down
6 changes: 5 additions & 1 deletion src/context/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ export function openContext(
parser: Parser,
parsedModules?: A.AstModule[],
): CompilerContext {
const modules = parsedModules ?? parseModules(sources, parser);
const parsedSources = parseModules(sources, parser);
const modules =
typeof parsedModules === "undefined"
? parsedSources
: [...parsedSources, ...parsedModules];
const types: A.AstTypeDecl[] = [];
const functions: (
| A.AstNativeFunctionDecl
Expand Down
22 changes: 22 additions & 0 deletions src/test/autogenerated/contracts/deployer.tact
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
message(100) DeployMessage {
addr: Address;
data: Cell;
code: Cell;
}

struct StateInitWrapper {
init: StateInit;
}

contract Dummy1 { }

contract Dummy2 { }

contract Deployer {
receive(msg: DeployMessage) {
let addr = msg.addr;
let data = msg.data;
let code = msg.code;
send(SendParameters{to: addr, bounce: false, value: ton("10"), data: data, code: code});
}
}
Empty file.
Loading