goscript 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -7
- package/builtin/builtin.ts +31 -21
- package/compiler/compile_expr.go +6 -2
- package/compiler/compile_stmt.go +15 -26
- package/dist/builtin/builtin.d.ts +1 -1
- package/dist/builtin/builtin.js +29 -18
- package/dist/builtin/builtin.js.map +1 -1
- package/dist/compliance/tests/array_literal/array_literal.gs.d.ts +1 -0
- package/dist/compliance/tests/array_literal/array_literal.gs.js +14 -0
- package/dist/compliance/tests/array_literal/array_literal.gs.js.map +1 -0
- package/dist/compliance/tests/async_basic/async_basic.gs.d.ts +1 -0
- package/dist/compliance/tests/async_basic/async_basic.gs.js +24 -0
- package/dist/compliance/tests/async_basic/async_basic.gs.js.map +1 -0
- package/dist/compliance/tests/basic_arithmetic/basic_arithmetic.gs.d.ts +1 -0
- package/dist/compliance/tests/basic_arithmetic/basic_arithmetic.gs.js +16 -0
- package/dist/compliance/tests/basic_arithmetic/basic_arithmetic.gs.js.map +1 -0
- package/dist/compliance/tests/boolean_logic/boolean_logic.gs.d.ts +1 -0
- package/dist/compliance/tests/boolean_logic/boolean_logic.gs.js +14 -0
- package/dist/compliance/tests/boolean_logic/boolean_logic.gs.js.map +1 -0
- package/dist/compliance/tests/channel_basic/channel_basic.gs.d.ts +1 -0
- package/dist/compliance/tests/channel_basic/channel_basic.gs.js +14 -0
- package/dist/compliance/tests/channel_basic/channel_basic.gs.js.map +1 -0
- package/dist/compliance/tests/composite_literal_assignment/composite_literal_assignment.gs.d.ts +1 -0
- package/dist/compliance/tests/composite_literal_assignment/composite_literal_assignment.gs.js +23 -0
- package/dist/compliance/tests/composite_literal_assignment/composite_literal_assignment.gs.js.map +1 -0
- package/dist/compliance/tests/constants/constants.gs.d.ts +1 -0
- package/dist/compliance/tests/constants/constants.gs.js +16 -0
- package/dist/compliance/tests/constants/constants.gs.js.map +1 -0
- package/dist/compliance/tests/copy_independence/copy_independence.gs.d.ts +1 -0
- package/dist/compliance/tests/copy_independence/copy_independence.gs.js +31 -0
- package/dist/compliance/tests/copy_independence/copy_independence.gs.js.map +1 -0
- package/dist/compliance/tests/float64/float64.gs.d.ts +1 -0
- package/dist/compliance/tests/float64/float64.gs.js +23 -0
- package/dist/compliance/tests/float64/float64.gs.js.map +1 -0
- package/dist/compliance/tests/for_loop_basic/for_loop_basic.gs.d.ts +1 -0
- package/dist/compliance/tests/for_loop_basic/for_loop_basic.gs.js +10 -0
- package/dist/compliance/tests/for_loop_basic/for_loop_basic.gs.js.map +1 -0
- package/dist/compliance/tests/for_loop_condition_only/for_loop_condition_only.gs.d.ts +1 -0
- package/dist/compliance/tests/for_loop_condition_only/for_loop_condition_only.gs.js +11 -0
- package/dist/compliance/tests/for_loop_condition_only/for_loop_condition_only.gs.js.map +1 -0
- package/dist/compliance/tests/for_loop_condition_only/main.gs.d.ts +1 -0
- package/dist/compliance/tests/for_loop_condition_only/main.gs.js +10 -0
- package/dist/compliance/tests/for_loop_condition_only/main.gs.js.map +1 -0
- package/dist/compliance/tests/for_range/for_range.gs.d.ts +1 -0
- package/dist/compliance/tests/for_range/for_range.gs.js +39 -0
- package/dist/compliance/tests/for_range/for_range.gs.js.map +1 -0
- package/dist/compliance/tests/for_range_index_use/for_range_index_use.gs.d.ts +1 -0
- package/dist/compliance/tests/for_range_index_use/for_range_index_use.gs.js +15 -0
- package/dist/compliance/tests/for_range_index_use/for_range_index_use.gs.js.map +1 -0
- package/dist/compliance/tests/func_literal/func_literal.gs.d.ts +1 -0
- package/dist/compliance/tests/func_literal/func_literal.gs.js +10 -0
- package/dist/compliance/tests/func_literal/func_literal.gs.js.map +1 -0
- package/dist/compliance/tests/function_call_result_assignment/function_call_result_assignment.gs.d.ts +10 -0
- package/dist/compliance/tests/function_call_result_assignment/function_call_result_assignment.gs.js +26 -0
- package/dist/compliance/tests/function_call_result_assignment/function_call_result_assignment.gs.js.map +1 -0
- package/dist/compliance/tests/if_statement/if_statement.gs.d.ts +1 -0
- package/dist/compliance/tests/if_statement/if_statement.gs.js +13 -0
- package/dist/compliance/tests/if_statement/if_statement.gs.js.map +1 -0
- package/dist/compliance/tests/interface_to_interface_type_assertion/interface_to_interface_type_assertion.gs.d.ts +1 -0
- package/dist/compliance/tests/interface_to_interface_type_assertion/interface_to_interface_type_assertion.gs.js +26 -0
- package/dist/compliance/tests/interface_to_interface_type_assertion/interface_to_interface_type_assertion.gs.js.map +1 -0
- package/dist/compliance/tests/interface_type_assertion/interface_type_assertion.gs.d.ts +1 -0
- package/dist/compliance/tests/interface_type_assertion/interface_type_assertion.gs.js +26 -0
- package/dist/compliance/tests/interface_type_assertion/interface_type_assertion.gs.js.map +1 -0
- package/dist/compliance/tests/map_support/map_support.gs.d.ts +1 -0
- package/dist/compliance/tests/map_support/map_support.gs.js +88 -0
- package/dist/compliance/tests/map_support/map_support.gs.js.map +1 -0
- package/dist/compliance/tests/method_call_on_pointer_receiver/method_call_on_pointer_receiver.gs.d.ts +1 -0
- package/dist/compliance/tests/method_call_on_pointer_receiver/method_call_on_pointer_receiver.gs.js +22 -0
- package/dist/compliance/tests/method_call_on_pointer_receiver/method_call_on_pointer_receiver.gs.js.map +1 -0
- package/dist/compliance/tests/method_call_on_pointer_via_value/method_call_on_pointer_via_value.gs.d.ts +1 -0
- package/dist/compliance/tests/method_call_on_pointer_via_value/method_call_on_pointer_via_value.gs.js +30 -0
- package/dist/compliance/tests/method_call_on_pointer_via_value/method_call_on_pointer_via_value.gs.js.map +1 -0
- package/dist/compliance/tests/method_call_on_value_receiver/method_call_on_value_receiver.gs.d.ts +1 -0
- package/dist/compliance/tests/method_call_on_value_receiver/method_call_on_value_receiver.gs.js +19 -0
- package/dist/compliance/tests/method_call_on_value_receiver/method_call_on_value_receiver.gs.js.map +1 -0
- package/dist/compliance/tests/method_call_on_value_via_pointer/method_call_on_value_via_pointer.gs.d.ts +1 -0
- package/dist/compliance/tests/method_call_on_value_via_pointer/method_call_on_value_via_pointer.gs.js +30 -0
- package/dist/compliance/tests/method_call_on_value_via_pointer/method_call_on_value_via_pointer.gs.js.map +1 -0
- package/dist/compliance/tests/multiple_return_values/multiple_return_values.gs.d.ts +1 -0
- package/dist/compliance/tests/multiple_return_values/multiple_return_values.gs.js +17 -0
- package/dist/compliance/tests/multiple_return_values/multiple_return_values.gs.js.map +1 -0
- package/dist/compliance/tests/pointer_assignment_no_copy/pointer_assignment_no_copy.gs.d.ts +1 -0
- package/dist/compliance/tests/pointer_assignment_no_copy/pointer_assignment_no_copy.gs.js +26 -0
- package/dist/compliance/tests/pointer_assignment_no_copy/pointer_assignment_no_copy.gs.js.map +1 -0
- package/dist/compliance/tests/pointer_composite_literal_assignment/pointer_composite_literal_assignment.gs.d.ts +1 -0
- package/dist/compliance/tests/pointer_composite_literal_assignment/pointer_composite_literal_assignment.gs.js +24 -0
- package/dist/compliance/tests/pointer_composite_literal_assignment/pointer_composite_literal_assignment.gs.js.map +1 -0
- package/dist/compliance/tests/pointer_deref_multiassign/pointer_deref_multiassign.gs.d.ts +1 -0
- package/dist/compliance/tests/pointer_deref_multiassign/pointer_deref_multiassign.gs.js +19 -0
- package/dist/compliance/tests/pointer_deref_multiassign/pointer_deref_multiassign.gs.js.map +1 -0
- package/dist/compliance/tests/pointer_initialization/pointer_initialization.gs.d.ts +1 -0
- package/dist/compliance/tests/pointer_initialization/pointer_initialization.gs.js +18 -0
- package/dist/compliance/tests/pointer_initialization/pointer_initialization.gs.js.map +1 -0
- package/dist/compliance/tests/select_receive_on_closed_channel_no_default/select_receive_on_closed_channel_no_default.gs.d.ts +1 -0
- package/dist/compliance/tests/select_receive_on_closed_channel_no_default/select_receive_on_closed_channel_no_default.gs.js +27 -0
- package/dist/compliance/tests/select_receive_on_closed_channel_no_default/select_receive_on_closed_channel_no_default.gs.js.map +1 -0
- package/dist/compliance/tests/select_send_on_full_buffered_channel_with_default/select_send_on_full_buffered_channel_with_default.gs.d.ts +1 -0
- package/dist/compliance/tests/select_send_on_full_buffered_channel_with_default/select_send_on_full_buffered_channel_with_default.gs.js +29 -0
- package/dist/compliance/tests/select_send_on_full_buffered_channel_with_default/select_send_on_full_buffered_channel_with_default.gs.js.map +1 -0
- package/dist/compliance/tests/select_statement/select_statement.gs.d.ts +1 -0
- package/dist/compliance/tests/select_statement/select_statement.gs.js +209 -0
- package/dist/compliance/tests/select_statement/select_statement.gs.js.map +1 -0
- package/dist/compliance/tests/simple/simple.gs.d.ts +1 -0
- package/dist/compliance/tests/simple/simple.gs.js +6 -0
- package/dist/compliance/tests/simple/simple.gs.js.map +1 -0
- package/dist/compliance/tests/simple_deref_assignment/simple_deref_assignment.gs.d.ts +1 -0
- package/dist/compliance/tests/simple_deref_assignment/simple_deref_assignment.gs.js +22 -0
- package/dist/compliance/tests/simple_deref_assignment/simple_deref_assignment.gs.js.map +1 -0
- package/dist/compliance/tests/slices/slices.gs.d.ts +1 -0
- package/dist/compliance/tests/slices/slices.gs.js +21 -0
- package/dist/compliance/tests/slices/slices.gs.js.map +1 -0
- package/dist/compliance/tests/string_rune_conversion/string_rune_conversion.gs.d.ts +1 -0
- package/dist/compliance/tests/string_rune_conversion/string_rune_conversion.gs.js +17 -0
- package/dist/compliance/tests/string_rune_conversion/string_rune_conversion.gs.js.map +1 -0
- package/dist/compliance/tests/struct_field_access/struct_field_access.gs.d.ts +1 -0
- package/dist/compliance/tests/struct_field_access/struct_field_access.gs.js +16 -0
- package/dist/compliance/tests/struct_field_access/struct_field_access.gs.js.map +1 -0
- package/dist/compliance/tests/struct_value_init_clone/struct_value_init_clone.gs.d.ts +1 -0
- package/dist/compliance/tests/struct_value_init_clone/struct_value_init_clone.gs.js +27 -0
- package/dist/compliance/tests/struct_value_init_clone/struct_value_init_clone.gs.js.map +1 -0
- package/dist/compliance/tests/switch_statement/switch_statement.gs.d.ts +1 -0
- package/dist/compliance/tests/switch_statement/switch_statement.gs.js +76 -0
- package/dist/compliance/tests/switch_statement/switch_statement.gs.js.map +1 -0
- package/dist/compliance/tests/value_type_copy_behavior/value_type_copy_behavior.gs.d.ts +1 -0
- package/dist/compliance/tests/value_type_copy_behavior/value_type_copy_behavior.gs.js +29 -0
- package/dist/compliance/tests/value_type_copy_behavior/value_type_copy_behavior.gs.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Generated file based on pointer_composite_literal_assignment.go
|
|
2
|
+
// Updated when compliance tests are re-run, DO NOT EDIT!
|
|
3
|
+
class MyStruct {
|
|
4
|
+
MyInt = 0;
|
|
5
|
+
MyString = "";
|
|
6
|
+
constructor(init) { if (init)
|
|
7
|
+
Object.assign(this, init); }
|
|
8
|
+
clone() { return Object.assign(Object.create(MyStruct.prototype), this); }
|
|
9
|
+
}
|
|
10
|
+
export async function main() {
|
|
11
|
+
// === Pointer Composite Literal Assignment ===
|
|
12
|
+
// Creating a pointer to a struct directly using a composite literal with &
|
|
13
|
+
let structPointer = new MyStruct({ MyInt: 42, MyString: "composite literal pointer" });
|
|
14
|
+
// Access fields through the pointer
|
|
15
|
+
// Expected: 42
|
|
16
|
+
console.log("MyInt via pointer: Expected: 42, Actual:", structPointer.MyInt);
|
|
17
|
+
// Expected: "composite literal pointer"
|
|
18
|
+
console.log("MyString via pointer: Expected: composite literal pointer, Actual: " + structPointer.MyString);
|
|
19
|
+
// Modify through the pointer
|
|
20
|
+
structPointer.MyInt = 99;
|
|
21
|
+
// Expected: 99
|
|
22
|
+
console.log("MyInt after modification: Expected: 99, Actual:", structPointer.MyInt);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=pointer_composite_literal_assignment.gs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pointer_composite_literal_assignment.gs.js","sourceRoot":"","sources":["../../../../compliance/tests/pointer_composite_literal_assignment/pointer_composite_literal_assignment.gs.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,yDAAyD;AAIzD,MAAM,QAAQ;IACN,KAAK,GAAW,CAAC,CAAC;IAClB,QAAQ,GAAW,EAAE,CAAC;IAE7B,YAAY,IAAwB,IAAI,IAAI,IAAI;QAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAW,CAAC,CAAC,CAAC,CAAC;IAC9E,KAAK,KAAe,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAa,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;CACvG;AAED,MAAM,CAAC,KAAK,UAAU,IAAI;IACzB,+CAA+C;IAC/C,2EAA2E;IAC3E,IAAI,aAAa,GAAG,IAAI,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,2BAA2B,EAAE,CAAC,CAAA;IAEtF,oCAAoC;IACpC,eAAe;IACf,OAAO,CAAC,GAAG,CAAC,0CAA0C,EAAE,aAAa,CAAC,KAAK,CAAC,CAAA;IAC5E,wCAAwC;IACxC,OAAO,CAAC,GAAG,CAAC,qEAAqE,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAA;IAE3G,6BAA6B;IAC7B,aAAa,CAAC,KAAK,GAAG,EAAE,CAAA;IACxB,eAAe;IACf,OAAO,CAAC,GAAG,CAAC,iDAAiD,EAAE,aAAa,CAAC,KAAK,CAAC,CAAA;AACpF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function main(): Promise<void>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Generated file based on pointer_deref_multiassign.go
|
|
2
|
+
// Updated when compliance tests are re-run, DO NOT EDIT!
|
|
3
|
+
class MyStruct {
|
|
4
|
+
MyInt = 0;
|
|
5
|
+
MyString = "";
|
|
6
|
+
myBool = false;
|
|
7
|
+
constructor(init) { if (init)
|
|
8
|
+
Object.assign(this, init); }
|
|
9
|
+
clone() { return Object.assign(Object.create(MyStruct.prototype), this); }
|
|
10
|
+
}
|
|
11
|
+
export async function main() {
|
|
12
|
+
let structPointer = new MyStruct({ MyInt: 4, MyString: "hello world" });
|
|
13
|
+
// === Pointer Dereference and Multi-Assignment ===
|
|
14
|
+
// Dereference structPointer to get a copy of the struct.
|
|
15
|
+
// Also demonstrates multi-variable assignment and the use of the blank identifier '_'.
|
|
16
|
+
let dereferencedStructCopy = structPointer.clone();
|
|
17
|
+
let unusedString = "hello"; // testing _ set
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=pointer_deref_multiassign.gs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pointer_deref_multiassign.gs.js","sourceRoot":"","sources":["../../../../compliance/tests/pointer_deref_multiassign/pointer_deref_multiassign.gs.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,yDAAyD;AAIzD,MAAM,QAAQ;IACN,KAAK,GAAW,CAAC,CAAC;IAClB,QAAQ,GAAW,EAAE,CAAC;IACrB,MAAM,GAAY,KAAK,CAAC;IAEhC,YAAY,IAAwB,IAAI,IAAI,IAAI;QAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAW,CAAC,CAAC,CAAC,CAAC;IAC9E,KAAK,KAAe,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAa,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;CACvG;AAED,MAAM,CAAC,KAAK,UAAU,IAAI;IACzB,IAAI,aAAa,GAAG,IAAI,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC,CAAA;IACvE,mDAAmD;IACnD,yDAAyD;IACzD,uFAAuF;IACvF,IAAI,sBAAsB,GAAG,aAAa,CAAC,KAAK,EAAE,CAAA;IAClD,IAAI,YAAY,GAAG,OAAO,CAAA,CAAC,gBAAgB;AAC5C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function main(): Promise<void>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Generated file based on pointer_initialization.go
|
|
2
|
+
// Updated when compliance tests are re-run, DO NOT EDIT!
|
|
3
|
+
class MyStruct {
|
|
4
|
+
MyInt = 0;
|
|
5
|
+
MyString = "";
|
|
6
|
+
myBool = false;
|
|
7
|
+
constructor(init) { if (init)
|
|
8
|
+
Object.assign(this, init); }
|
|
9
|
+
clone() { return Object.assign(Object.create(MyStruct.prototype), this); }
|
|
10
|
+
}
|
|
11
|
+
export async function main() {
|
|
12
|
+
// === Pointer Initialization ===
|
|
13
|
+
// Create a pointer to a MyStruct instance using a composite literal.
|
|
14
|
+
let structPointer = new MyStruct({ MyInt: 4, MyString: "hello world" });
|
|
15
|
+
// Expected: "hello world"
|
|
16
|
+
console.log("Initial MyString (via pointer): Expected: hello world, Actual: " + structPointer.MyString);
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=pointer_initialization.gs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pointer_initialization.gs.js","sourceRoot":"","sources":["../../../../compliance/tests/pointer_initialization/pointer_initialization.gs.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,yDAAyD;AAIzD,MAAM,QAAQ;IACN,KAAK,GAAW,CAAC,CAAC;IAClB,QAAQ,GAAW,EAAE,CAAC;IACrB,MAAM,GAAY,KAAK,CAAC;IAEhC,YAAY,IAAwB,IAAI,IAAI,IAAI;QAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAW,CAAC,CAAC,CAAC,CAAC;IAC9E,KAAK,KAAe,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAa,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;CACvG;AAED,MAAM,CAAC,KAAK,UAAU,IAAI;IACzB,iCAAiC;IACjC,qEAAqE;IACrE,IAAI,aAAa,GAAG,IAAI,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC,CAAA;IACvE,0BAA0B;IAC1B,OAAO,CAAC,GAAG,CAAC,iEAAiE,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAA;AACxG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function main(): Promise<void>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Generated file based on select_receive_on_closed_channel_no_default.go
|
|
2
|
+
// Updated when compliance tests are re-run, DO NOT EDIT!
|
|
3
|
+
import * as goscript from "@go/builtin";
|
|
4
|
+
export async function main() {
|
|
5
|
+
let ch = goscript.makeChannel(0, 0); // Unbuffered
|
|
6
|
+
ch.close();
|
|
7
|
+
// Should not be reached
|
|
8
|
+
// Should be reached
|
|
9
|
+
await goscript.selectStatement([
|
|
10
|
+
{
|
|
11
|
+
id: 0,
|
|
12
|
+
isSend: false,
|
|
13
|
+
channel: ch,
|
|
14
|
+
onSelected: async (result) => {
|
|
15
|
+
const val = result.value;
|
|
16
|
+
const ok = result.ok;
|
|
17
|
+
if (ok) {
|
|
18
|
+
console.log("Received value with ok==true:", val); // Should not be reached
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
console.log("Received zero value with ok==false:", val); // Should be reached
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
], false);
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=select_receive_on_closed_channel_no_default.gs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select_receive_on_closed_channel_no_default.gs.js","sourceRoot":"","sources":["../../../../compliance/tests/select_receive_on_closed_channel_no_default/select_receive_on_closed_channel_no_default.gs.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,yDAAyD;AAEzD,OAAO,KAAK,QAAQ,MAAM,aAAa,CAAC;AAExC,MAAM,CAAC,KAAK,UAAU,IAAI;IACzB,IAAI,EAAE,GAAG,QAAQ,CAAC,WAAW,CAAS,CAAC,EAAE,CAAC,CAAC,CAAA,CAAC,aAAa;IACzD,EAAE,CAAC,KAAK,EAAE,CAAA;IAEV,wBAAwB;IAExB,oBAAoB;IACpB,MAAM,QAAQ,CAAC,eAAe,CAAC;QAC9B;YACC,EAAE,EAAE,CAAC;YACL,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,EAAE;YACX,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;gBAC5B,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAA;gBACxB,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,CAAA;gBACpB,IAAI,EAAE,EAAE,CAAC;oBACR,OAAO,CAAC,GAAG,CAAC,+BAA+B,EAAE,GAAG,CAAC,CAAA,CAAC,wBAAwB;gBAC3E,CAAC;qBAAM,CAAC;oBACP,OAAO,CAAC,GAAG,CAAC,qCAAqC,EAAE,GAAG,CAAC,CAAA,CAAC,oBAAoB;gBAC7E,CAAC;YACF,CAAC;SACD;KACD,EAAE,KAAK,CAAC,CAAA;AACV,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function main(): Promise<void>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Generated file based on select_send_on_full_buffered_channel_with_default.go
|
|
2
|
+
// Updated when compliance tests are re-run, DO NOT EDIT!
|
|
3
|
+
import * as goscript from "@go/builtin";
|
|
4
|
+
export async function main() {
|
|
5
|
+
let ch = goscript.makeChannel(1, 0);
|
|
6
|
+
await ch.send(1);
|
|
7
|
+
// Should not be reached
|
|
8
|
+
// Should be reached
|
|
9
|
+
await goscript.selectStatement([
|
|
10
|
+
{
|
|
11
|
+
id: 0,
|
|
12
|
+
isSend: true,
|
|
13
|
+
channel: ch,
|
|
14
|
+
value: 2,
|
|
15
|
+
onSelected: async (result) => {
|
|
16
|
+
console.log("Sent value");
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: -1,
|
|
21
|
+
isSend: false,
|
|
22
|
+
channel: null,
|
|
23
|
+
onSelected: async (result) => {
|
|
24
|
+
console.log("Default case hit");
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
], true);
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=select_send_on_full_buffered_channel_with_default.gs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select_send_on_full_buffered_channel_with_default.gs.js","sourceRoot":"","sources":["../../../../compliance/tests/select_send_on_full_buffered_channel_with_default/select_send_on_full_buffered_channel_with_default.gs.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,yDAAyD;AAEzD,OAAO,KAAK,QAAQ,MAAM,aAAa,CAAC;AAExC,MAAM,CAAC,KAAK,UAAU,IAAI;IACzB,IAAI,EAAE,GAAG,QAAQ,CAAC,WAAW,CAAS,CAAC,EAAE,CAAC,CAAC,CAAA;IAC3C,MAAM,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IAEhB,wBAAwB;IAExB,oBAAoB;IACpB,MAAM,QAAQ,CAAC,eAAe,CAAC;QAC9B;YACC,EAAE,EAAE,CAAC;YACL,MAAM,EAAE,IAAI;YACZ,OAAO,EAAE,EAAE;YACX,KAAK,EAAE,CAAC;YACR,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;gBAC5B,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAA;YAC1B,CAAC;SACD;QACD;YACC,EAAE,EAAE,CAAC,CAAC;YACN,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,IAAI;YACb,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;gBAC5B,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAA;YAChC,CAAC;SACD;KACD,EAAE,IAAI,CAAC,CAAA;AACT,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function main(): Promise<void>;
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
// Generated file based on select_statement.go
|
|
2
|
+
// Updated when compliance tests are re-run, DO NOT EDIT!
|
|
3
|
+
import * as goscript from "@go/builtin";
|
|
4
|
+
export async function main() {
|
|
5
|
+
// Test 1: Simple deterministic select with default
|
|
6
|
+
// Create a buffered channel so sends don't block
|
|
7
|
+
let ch1 = goscript.makeChannel(1, "");
|
|
8
|
+
// First test: empty channel, should hit default
|
|
9
|
+
await goscript.selectStatement([
|
|
10
|
+
{
|
|
11
|
+
id: 0,
|
|
12
|
+
isSend: false,
|
|
13
|
+
channel: ch1,
|
|
14
|
+
onSelected: async (result) => {
|
|
15
|
+
const msg = result.value;
|
|
16
|
+
console.log("TEST1: Received unexpected value:", msg);
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: -1,
|
|
21
|
+
isSend: false,
|
|
22
|
+
channel: null,
|
|
23
|
+
onSelected: async (result) => {
|
|
24
|
+
console.log("TEST1: Default case hit correctly");
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
], true);
|
|
28
|
+
// Now put something in the channel
|
|
29
|
+
await ch1.send("hello");
|
|
30
|
+
// Second test: should read from channel
|
|
31
|
+
await goscript.selectStatement([
|
|
32
|
+
{
|
|
33
|
+
id: 0,
|
|
34
|
+
isSend: false,
|
|
35
|
+
channel: ch1,
|
|
36
|
+
onSelected: async (result) => {
|
|
37
|
+
const msg = result.value;
|
|
38
|
+
console.log("TEST2: Received expected value:", msg);
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: -1,
|
|
43
|
+
isSend: false,
|
|
44
|
+
channel: null,
|
|
45
|
+
onSelected: async (result) => {
|
|
46
|
+
console.log("TEST2: Default case hit unexpectedly");
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
], true);
|
|
50
|
+
// Test 3: Select with channel closing and ok value
|
|
51
|
+
let ch2 = goscript.makeChannel(1, 0);
|
|
52
|
+
await ch2.send(42);
|
|
53
|
+
ch2.close();
|
|
54
|
+
// First receive gets the buffered value
|
|
55
|
+
await goscript.selectStatement([
|
|
56
|
+
{
|
|
57
|
+
id: 0,
|
|
58
|
+
isSend: false,
|
|
59
|
+
channel: ch2,
|
|
60
|
+
onSelected: async (result) => {
|
|
61
|
+
const val = result.value;
|
|
62
|
+
const ok = result.ok;
|
|
63
|
+
if (ok) {
|
|
64
|
+
console.log("TEST3: Received buffered value with ok==true:", val);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
console.log("TEST3: Unexpected ok==false");
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
id: -1,
|
|
73
|
+
isSend: false,
|
|
74
|
+
channel: null,
|
|
75
|
+
onSelected: async (result) => {
|
|
76
|
+
console.log("TEST3: Default hit unexpectedly");
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
], true);
|
|
80
|
+
// Second receive gets the zero value with ok==false
|
|
81
|
+
await goscript.selectStatement([
|
|
82
|
+
{
|
|
83
|
+
id: 0,
|
|
84
|
+
isSend: false,
|
|
85
|
+
channel: ch2,
|
|
86
|
+
onSelected: async (result) => {
|
|
87
|
+
const val = result.value;
|
|
88
|
+
const ok = result.ok;
|
|
89
|
+
if (ok) {
|
|
90
|
+
console.log("TEST4: Unexpected ok==true:", val);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
console.log("TEST4: Received zero value with ok==false:", val);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
id: -1,
|
|
99
|
+
isSend: false,
|
|
100
|
+
channel: null,
|
|
101
|
+
onSelected: async (result) => {
|
|
102
|
+
console.log("TEST4: Default hit unexpectedly");
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
], true);
|
|
106
|
+
// Test 5: Send operations
|
|
107
|
+
let ch3 = goscript.makeChannel(1, 0);
|
|
108
|
+
// First send should succeed (buffer not full)
|
|
109
|
+
await goscript.selectStatement([
|
|
110
|
+
{
|
|
111
|
+
id: 0,
|
|
112
|
+
isSend: true,
|
|
113
|
+
channel: ch3,
|
|
114
|
+
value: 5,
|
|
115
|
+
onSelected: async (result) => {
|
|
116
|
+
console.log("TEST5: Sent value successfully");
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
id: -1,
|
|
121
|
+
isSend: false,
|
|
122
|
+
channel: null,
|
|
123
|
+
onSelected: async (result) => {
|
|
124
|
+
console.log("TEST5: Default hit unexpectedly");
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
], true);
|
|
128
|
+
// Second send should hit default (buffer full)
|
|
129
|
+
await goscript.selectStatement([
|
|
130
|
+
{
|
|
131
|
+
id: 0,
|
|
132
|
+
isSend: true,
|
|
133
|
+
channel: ch3,
|
|
134
|
+
value: 10,
|
|
135
|
+
onSelected: async (result) => {
|
|
136
|
+
console.log("TEST6: Sent unexpectedly");
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
id: -1,
|
|
141
|
+
isSend: false,
|
|
142
|
+
channel: null,
|
|
143
|
+
onSelected: async (result) => {
|
|
144
|
+
console.log("TEST6: Default hit correctly (channel full)");
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
], true);
|
|
148
|
+
// Test 7: Multiple channel select (with known values)
|
|
149
|
+
let ch4 = goscript.makeChannel(1, "");
|
|
150
|
+
let ch5 = goscript.makeChannel(1, "");
|
|
151
|
+
await ch4.send("from ch4");
|
|
152
|
+
// Should select ch4 because it has data, ch5 is empty
|
|
153
|
+
await goscript.selectStatement([
|
|
154
|
+
{
|
|
155
|
+
id: 0,
|
|
156
|
+
isSend: false,
|
|
157
|
+
channel: ch4,
|
|
158
|
+
onSelected: async (result) => {
|
|
159
|
+
const msg = result.value;
|
|
160
|
+
console.log("TEST7: Selected ch4 correctly:", msg);
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
id: 1,
|
|
165
|
+
isSend: false,
|
|
166
|
+
channel: ch5,
|
|
167
|
+
onSelected: async (result) => {
|
|
168
|
+
const msg = result.value;
|
|
169
|
+
console.log("TEST7: Selected ch5 unexpectedly:", msg);
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
], false);
|
|
173
|
+
// Now ch4 is empty and ch5 is empty
|
|
174
|
+
await ch5.send("from ch5");
|
|
175
|
+
// Should select ch5 because it has data, ch4 is empty
|
|
176
|
+
await goscript.selectStatement([
|
|
177
|
+
{
|
|
178
|
+
id: 0,
|
|
179
|
+
isSend: false,
|
|
180
|
+
channel: ch4,
|
|
181
|
+
onSelected: async (result) => {
|
|
182
|
+
const msg = result.value;
|
|
183
|
+
console.log("TEST8: Selected ch4 unexpectedly:", msg);
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
id: 1,
|
|
188
|
+
isSend: false,
|
|
189
|
+
channel: ch5,
|
|
190
|
+
onSelected: async (result) => {
|
|
191
|
+
const msg = result.value;
|
|
192
|
+
console.log("TEST8: Selected ch5 correctly:", msg);
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
], false);
|
|
196
|
+
// Test 9: Channel closing test case for a separate test
|
|
197
|
+
let chClose = goscript.makeChannel(0, false);
|
|
198
|
+
chClose.close();
|
|
199
|
+
const _tempVar1 = await chClose.receiveWithOk();
|
|
200
|
+
let val = _tempVar1.value;
|
|
201
|
+
let ok = _tempVar1.ok;
|
|
202
|
+
if (!ok) {
|
|
203
|
+
console.log("TEST9: Channel is closed, ok is false, val:", val);
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
console.log("TEST9: Channel reports as not closed");
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
//# sourceMappingURL=select_statement.gs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select_statement.gs.js","sourceRoot":"","sources":["../../../../compliance/tests/select_statement/select_statement.gs.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,yDAAyD;AAEzD,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C,eAAe,CAAC;QAC9B;YACC,EAAE,EAAE,CAAC;YACL,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,GAAG;YACZ,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;gBAC5B,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAA;gBACxB,OAAO,CAAC,GAAG,CAAC,mCAAmC,EAAE,GAAG,CAAC,CAAA;YACtD,CAAC;SACD;QACD;YACC,EAAE,EAAE,CAAC;YACL,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,GAAG;YACZ,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;gBAC5B,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAA;gBACxB,OAAO,CAAC,GAAG,CAAC,gCAAgC,EAAE,GAAG,CAAC,CAAA;YACnD,CAAC;SACD;KACD,EAAE,KAAK,CAAC,CAAA;IAET,wDAAwD;IACxD,IAAI,OAAO,GAAG,QAAQ,CAAC,WAAW,CAAU,CAAC,EAAE,KAAK,CAAC,CAAA;IACrD,OAAO,CAAC,KAAK,EAAE,CAAA;IACf,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,aAAa,EAAE,CAAA;IAC/C,IAAI,GAAG,GAAG,SAAS,CAAC,KAAK,CAAA;IACzB,IAAI,EAAE,GAAG,SAAS,CAAC,EAAE,CAAA;IACrB,IAAI,CAAC,EAAE,EAAE,CAAC;QACT,OAAO,CAAC,GAAG,CAAC,6CAA6C,EAAE,GAAG,CAAC,CAAA;IAChE,CAAC;SAAM,CAAC;QACP,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAA;IACpD,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function main(): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simple.gs.js","sourceRoot":"","sources":["../../../../compliance/tests/simple/simple.gs.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,yDAAyD;AAIzD,MAAM,CAAC,KAAK,UAAU,IAAI;IACzB,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAA;AAC5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function main(): Promise<void>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Generated file based on simple_deref_assignment.go
|
|
2
|
+
// Updated when compliance tests are re-run, DO NOT EDIT!
|
|
3
|
+
class MyStruct {
|
|
4
|
+
MyInt = 0;
|
|
5
|
+
MyString = "";
|
|
6
|
+
myBool = false;
|
|
7
|
+
constructor(init) { if (init)
|
|
8
|
+
Object.assign(this, init); }
|
|
9
|
+
clone() { return Object.assign(Object.create(MyStruct.prototype), this); }
|
|
10
|
+
}
|
|
11
|
+
export async function main() {
|
|
12
|
+
let structPointer = new MyStruct({ MyInt: 4, MyString: "hello world" });
|
|
13
|
+
// === Simple Dereference Assignment (Value Copy) ===
|
|
14
|
+
let simpleDereferencedCopy = structPointer.clone();
|
|
15
|
+
// Modifying the copy does not affect the original struct pointed to by structPointer.
|
|
16
|
+
simpleDereferencedCopy.MyString = "modified dereferenced copy";
|
|
17
|
+
// Expected: "hello world"
|
|
18
|
+
console.log("Original structPointer after modifying simpleDereferencedCopy: Expected: hello world, Actual: " + structPointer.MyString);
|
|
19
|
+
// Expected: "modified dereferenced copy"
|
|
20
|
+
console.log("Simple Dereferenced Copy: Expected: modified dereferenced copy, Actual: " + simpleDereferencedCopy.MyString);
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=simple_deref_assignment.gs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simple_deref_assignment.gs.js","sourceRoot":"","sources":["../../../../compliance/tests/simple_deref_assignment/simple_deref_assignment.gs.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,yDAAyD;AAIzD,MAAM,QAAQ;IACN,KAAK,GAAW,CAAC,CAAC;IAClB,QAAQ,GAAW,EAAE,CAAC;IACrB,MAAM,GAAY,KAAK,CAAC;IAEhC,YAAY,IAAwB,IAAI,IAAI,IAAI;QAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAW,CAAC,CAAC,CAAC,CAAC;IAC9E,KAAK,KAAe,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAa,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;CACvG;AAED,MAAM,CAAC,KAAK,UAAU,IAAI;IACzB,IAAI,aAAa,GAAG,IAAI,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC,CAAA;IACvE,qDAAqD;IACrD,IAAI,sBAAsB,GAAG,aAAa,CAAC,KAAK,EAAE,CAAA;IAClD,sFAAsF;IACtF,sBAAsB,CAAC,QAAQ,GAAG,4BAA4B,CAAA;IAC9D,0BAA0B;IAC1B,OAAO,CAAC,GAAG,CAAC,gGAAgG,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAA;IACtI,yCAAyC;IACzC,OAAO,CAAC,GAAG,CAAC,0EAA0E,GAAG,sBAAsB,CAAC,QAAQ,CAAC,CAAA;AAC1H,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function main(): Promise<void>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Generated file based on slices.go
|
|
2
|
+
// Updated when compliance tests are re-run, DO NOT EDIT!
|
|
3
|
+
import * as goscript from "@go/builtin";
|
|
4
|
+
export async function main() {
|
|
5
|
+
// Create a slice of integers with length 5 and capacity 10
|
|
6
|
+
let s = goscript.makeSlice(5, 10);
|
|
7
|
+
console.log(goscript.len(s));
|
|
8
|
+
console.log(goscript.cap(s));
|
|
9
|
+
// Create a slice of strings with length 3
|
|
10
|
+
let s2 = goscript.makeSlice(3);
|
|
11
|
+
console.log(goscript.len(s2));
|
|
12
|
+
console.log(goscript.cap(s2));
|
|
13
|
+
// Assign values
|
|
14
|
+
s[0] = 10;
|
|
15
|
+
s[4] = 20;
|
|
16
|
+
s2[1] = "hello";
|
|
17
|
+
console.log(s[0]);
|
|
18
|
+
console.log(s[4]);
|
|
19
|
+
console.log(s2[1]);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=slices.gs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slices.gs.js","sourceRoot":"","sources":["../../../../compliance/tests/slices/slices.gs.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,yDAAyD;AAEzD,OAAO,KAAK,QAAQ,MAAM,aAAa,CAAC;AAExC,MAAM,CAAC,KAAK,UAAU,IAAI;IACzB,2DAA2D;IAC3D,IAAI,CAAC,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IACjC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;IAC5B,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;IAE5B,0CAA0C;IAC1C,IAAI,EAAE,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA;IAC9B,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAA;IAC7B,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAA;IAE7B,gBAAgB;IAChB,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAA;IACT,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAA;IACT,EAAE,CAAC,CAAC,CAAC,GAAG,OAAO,CAAA;IAEf,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IACjB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IACjB,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;AACnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function main(): Promise<void>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Generated file based on string_rune_conversion.go
|
|
2
|
+
// Updated when compliance tests are re-run, DO NOT EDIT!
|
|
3
|
+
export async function main() {
|
|
4
|
+
// === string(rune) Conversion ===
|
|
5
|
+
let r = 65;
|
|
6
|
+
let s = String.fromCharCode(r);
|
|
7
|
+
console.log(s);
|
|
8
|
+
// 'a'
|
|
9
|
+
let r2 = 97;
|
|
10
|
+
let s2 = String.fromCharCode(r2);
|
|
11
|
+
console.log(s2);
|
|
12
|
+
// '€'
|
|
13
|
+
let r3 = 0x20AC;
|
|
14
|
+
let s3 = String.fromCharCode(r3);
|
|
15
|
+
console.log(s3);
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=string_rune_conversion.gs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string_rune_conversion.gs.js","sourceRoot":"","sources":["../../../../compliance/tests/string_rune_conversion/string_rune_conversion.gs.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,yDAAyD;AAIzD,MAAM,CAAC,KAAK,UAAU,IAAI;IACzB,kCAAkC;IAClC,IAAI,CAAC,GAAW,EAAE,CAAC;IACnB,IAAI,CAAC,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAA;IAC9B,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IAEd,MAAM;IACN,IAAI,EAAE,GAAW,EAAE,CAAC;IACpB,IAAI,EAAE,GAAG,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAA;IAChC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IAEf,MAAM;IACN,IAAI,EAAE,GAAW,MAAM,CAAC;IACxB,IAAI,EAAE,GAAG,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAA;IAChC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;AAChB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function main(): Promise<void>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Generated file based on struct_field_access.go
|
|
2
|
+
// Updated when compliance tests are re-run, DO NOT EDIT!
|
|
3
|
+
class MyStruct {
|
|
4
|
+
MyInt = 0;
|
|
5
|
+
MyString = "";
|
|
6
|
+
constructor(init) { if (init)
|
|
7
|
+
Object.assign(this, init); }
|
|
8
|
+
clone() { return Object.assign(Object.create(MyStruct.prototype), this); }
|
|
9
|
+
}
|
|
10
|
+
export async function main() {
|
|
11
|
+
// === Struct Field Access ===
|
|
12
|
+
let ms = new MyStruct({ MyInt: 42, MyString: "foo" });
|
|
13
|
+
console.log("MyInt: Expected: 42, Actual:", ms.MyInt);
|
|
14
|
+
console.log("MyString: Expected: foo, Actual:", ms.MyString);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=struct_field_access.gs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"struct_field_access.gs.js","sourceRoot":"","sources":["../../../../compliance/tests/struct_field_access/struct_field_access.gs.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,yDAAyD;AAIzD,MAAM,QAAQ;IACN,KAAK,GAAW,CAAC,CAAC;IAClB,QAAQ,GAAW,EAAE,CAAC;IAE7B,YAAY,IAAwB,IAAI,IAAI,IAAI;QAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAW,CAAC,CAAC,CAAC,CAAC;IAC9E,KAAK,KAAe,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAa,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;CACvG;AAED,MAAM,CAAC,KAAK,UAAU,IAAI;IACzB,8BAA8B;IAC9B,IAAI,EAAE,GAAG,IAAI,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAA;IACrD,OAAO,CAAC,GAAG,CAAC,8BAA8B,EAAE,EAAE,CAAC,KAAK,CAAC,CAAA;IACrD,OAAO,CAAC,GAAG,CAAC,kCAAkC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAA;AAC7D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function main(): Promise<void>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Generated file based on struct_value_init_clone.go
|
|
2
|
+
// Updated when compliance tests are re-run, DO NOT EDIT!
|
|
3
|
+
class Point {
|
|
4
|
+
X = 0;
|
|
5
|
+
Y = 0;
|
|
6
|
+
constructor(init) { if (init)
|
|
7
|
+
Object.assign(this, init); }
|
|
8
|
+
clone() { return Object.assign(Object.create(Point.prototype), this); }
|
|
9
|
+
}
|
|
10
|
+
export async function main() {
|
|
11
|
+
// Initialize directly
|
|
12
|
+
let p1 = new Point({ X: 1, Y: 2 });
|
|
13
|
+
console.log("p1:", p1.X, p1.Y);
|
|
14
|
+
// Assign to another variable (should trigger clone)
|
|
15
|
+
let p2 = p1.clone();
|
|
16
|
+
p2.X = 10; // Modify the copy
|
|
17
|
+
// Print both to show they are independent
|
|
18
|
+
console.log("p1 after p2 mod:", p1.X, p1.Y);
|
|
19
|
+
console.log("p2:", p2.X, p2.Y);
|
|
20
|
+
// Initialize via variable assignment
|
|
21
|
+
let v = new Point({ X: 3, Y: 4 });
|
|
22
|
+
let p3 = v.clone(); // Should trigger clone
|
|
23
|
+
p3.Y = 40; // Modify the copy
|
|
24
|
+
console.log("v after p3 mod:", v.X, v.Y);
|
|
25
|
+
console.log("p3:", p3.X, p3.Y);
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=struct_value_init_clone.gs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"struct_value_init_clone.gs.js","sourceRoot":"","sources":["../../../../compliance/tests/struct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C,kBAAkB;IAE5B,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;IACxC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAA;AAC/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function main(): Promise<void>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// Generated file based on switch_statement.go
|
|
2
|
+
// Updated when compliance tests are re-run, DO NOT EDIT!
|
|
3
|
+
export async function main() {
|
|
4
|
+
let i = 2;
|
|
5
|
+
console.log("Integer switch:");
|
|
6
|
+
switch (i) {
|
|
7
|
+
case 1:
|
|
8
|
+
console.log("one");
|
|
9
|
+
break;
|
|
10
|
+
case 2:
|
|
11
|
+
console.log("two");
|
|
12
|
+
break;
|
|
13
|
+
case 3:
|
|
14
|
+
console.log("three");
|
|
15
|
+
break;
|
|
16
|
+
default:
|
|
17
|
+
console.log("other integer");
|
|
18
|
+
break;
|
|
19
|
+
}
|
|
20
|
+
let s = "hello";
|
|
21
|
+
console.log("\nString switch:");
|
|
22
|
+
switch (s) {
|
|
23
|
+
case "world":
|
|
24
|
+
console.log("world");
|
|
25
|
+
break;
|
|
26
|
+
case "hello":
|
|
27
|
+
console.log("hello");
|
|
28
|
+
break;
|
|
29
|
+
default:
|
|
30
|
+
console.log("other string");
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
let x = -5;
|
|
34
|
+
console.log("\nSwitch without expression:");
|
|
35
|
+
// x > 0
|
|
36
|
+
switch (true) {
|
|
37
|
+
case x < 0:
|
|
38
|
+
console.log("negative");
|
|
39
|
+
break;
|
|
40
|
+
case x == 0:
|
|
41
|
+
console.log("zero");
|
|
42
|
+
break;
|
|
43
|
+
default:
|
|
44
|
+
console.log("positive");
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
x = 0;
|
|
48
|
+
console.log("\nSwitch without expression (zero):");
|
|
49
|
+
// x > 0
|
|
50
|
+
switch (true) {
|
|
51
|
+
case x < 0:
|
|
52
|
+
console.log("negative");
|
|
53
|
+
break;
|
|
54
|
+
case x == 0:
|
|
55
|
+
console.log("zero");
|
|
56
|
+
break;
|
|
57
|
+
default:
|
|
58
|
+
console.log("positive");
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
x = 10;
|
|
62
|
+
console.log("\nSwitch without expression (positive):");
|
|
63
|
+
// x > 0
|
|
64
|
+
switch (true) {
|
|
65
|
+
case x < 0:
|
|
66
|
+
console.log("negative");
|
|
67
|
+
break;
|
|
68
|
+
case x == 0:
|
|
69
|
+
console.log("zero");
|
|
70
|
+
break;
|
|
71
|
+
default:
|
|
72
|
+
console.log("positive");
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=switch_statement.gs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch_statement.gs.js","sourceRoot":"","sources":["../../../../compliance/tests/switch_statement/switch_statement.gs.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,yDAAyD;AAIzD,MAAM,CAAC,KAAK,UAAU,IAAI;IACzB,IAAI,CAAC,GAAG,CAAC,CAAA;IACT,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAA;IAC9B,QAAQ,CAAC,EAAE,CAAC;QACX,KAAK,CAAC;YACL,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;YAClB,MAAK;QACN,KAAK,CAAC;YACL,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;YAClB,MAAK;QACN,KAAK,CAAC;YACL,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;YACpB,MAAK;QACN;YACC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAA;YAC5B,MAAK;IACP,CAAC;IAED,IAAI,CAAC,GAAG,O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