-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove separation between statement_let and statement_let_no_type
- Loading branch information
Showing
7 changed files
with
41 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,33 @@ | ||
import { toNano } from '@ton/core'; | ||
import { ContractSystem } from '@tact-lang/emulator'; | ||
import { __DANGER_resetNodeId } from '../grammar/ast'; | ||
import { LocalTypeInferenceTester } from './features/output/local-type-inference_LocalTypeInferenceTester'; | ||
import { toNano } from "@ton/core"; | ||
import { ContractSystem } from "@tact-lang/emulator"; | ||
import { __DANGER_resetNodeId } from "../grammar/ast"; | ||
import { LocalTypeInferenceTester } from "./features/output/local-type-inference_LocalTypeInferenceTester"; | ||
|
||
describe('feature-local-type-inference', () => { | ||
describe("feature-local-type-inference", () => { | ||
beforeEach(() => { | ||
__DANGER_resetNodeId(); | ||
}); | ||
it('should automatically set types for let statements', async () => { | ||
|
||
it("should automatically set types for let statements", async () => { | ||
// Init | ||
const system = await ContractSystem.create(); | ||
const treasure = system.treasure('treasure'); | ||
const treasure = system.treasure("treasure"); | ||
const contract = system.open(await LocalTypeInferenceTester.fromInit()); | ||
await contract.send(treasure, { value: toNano('10') }, { $$type: 'Deploy', queryId: 0n }); | ||
await contract.send( | ||
treasure, | ||
{ value: toNano("10") }, | ||
{ $$type: "Deploy", queryId: 0n }, | ||
); | ||
await system.run(); | ||
|
||
expect(contract.abi).toMatchSnapshot(); | ||
expect(await contract.getTest1()).toStrictEqual(1n); | ||
expect(await contract.getTest2()).toStrictEqual(2n); | ||
expect((await contract.getTest3()).toRawString()).toBe(contract.address.toRawString()); | ||
expect((await contract.getTest4()).toRawString()).toBe(contract.address.toRawString()); | ||
expect((await contract.getTest3()).toRawString()).toBe( | ||
contract.address.toRawString(), | ||
); | ||
expect((await contract.getTest4()).toRawString()).toBe( | ||
contract.address.toRawString(), | ||
); | ||
expect(await contract.getTest5()).toStrictEqual(true); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters