Play

Check-in [16414b954b]
Login
Overview
Comment:Remove codegen test that requires boxing of Int. This will come at a later time, as it'll likely require a refactor.
Timelines: family | ancestors | descendants | both | unions
Files: files | file ages | folders
SHA3-256: 16414b954b7b584691d1a2e98c0edbfa758d3ec572e1fa9bb11946202e94d448
User & Date: robin.hansen on 2020-05-01 06:19:21
Other Links: branch diff | manifest | tags
Context
2020-05-01
06:30
Merge in support for union types. check-in: 8a363c2eb2 user: robin.hansen tags: trunk
06:19
Remove codegen test that requires boxing of Int. This will come at a later time, as it'll likely req... Closed-Leaf check-in: 16414b954b user: robin.hansen tags: unions
2020-04-30
14:45
multifn.test.js => multiword.test.js. check-in: 033875e136 user: robin.hansen tags: unions
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Modified wasm_tests/multiword.test.js from [f3a74dfda0] to [5d2fa1caec].

87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
          -
    `);

    const result = await compiler.run(wat, 'main');

    expect(result.stackElement()).toBe(20);
});

test('Primitive types', async () => {
    const wat = await compiler.toWat(`
        defunion: Money
        : { Int Cents }

        deftype: Cents
        : { value: Int }

        defmulti: add-dollar
        when: Int
            +
        when: Cents
            100 * swap value> + >Cents

        def: main
        entry: true
        : 100 >Cents
          1 add-dollar
    `);

    const result = await compiler.run(wat, 'main');

    expect(result.stackElement()).toBe(20);
});








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
87
88
89
90
91
92
93


























          -
    `);

    const result = await compiler.run(wat, 'main');

    expect(result.stackElement()).toBe(20);
});