-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* @license | ||
* Copyright 2024 Google LLC | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import * as Blockly from 'blockly-test/core'; | ||
|
||
/** | ||
* Test: should be able to import a generator instance, class, and | ||
* Order enum. | ||
*/ | ||
import {dartGenerator, DartGenerator, Order} from 'blockly-test/dart'; | ||
Check failure on line 13 in tests/typescript/src/generators/dart.ts GitHub Actions / build (ubuntu-latest, 18.x)
Check failure on line 13 in tests/typescript/src/generators/dart.ts GitHub Actions / build (ubuntu-latest, 18.x)
Check failure on line 13 in tests/typescript/src/generators/dart.ts GitHub Actions / build (ubuntu-latest, 18.x)
Check failure on line 13 in tests/typescript/src/generators/dart.ts GitHub Actions / build (ubuntu-latest, 20.x)
Check failure on line 13 in tests/typescript/src/generators/dart.ts GitHub Actions / build (ubuntu-latest, 20.x)
|
||
|
||
/** | ||
* Test: should be able to create a simple block generator function, | ||
* correctly typed, and insert it into the .forBlock dictionary. | ||
*/ | ||
dartGenerator.forBlock['the_answer'] = function ( | ||
_block: Blockly.Block, | ||
_generator: DartGenerator, | ||
): [string, Order] { | ||
return ['42', Order.ATOMIC]; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* @license | ||
* Copyright 2024 Google LLC | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import * as Blockly from 'blockly-test/core'; | ||
|
||
/** | ||
* Test: should be able to import a generator instance, class, and | ||
* Order enum. | ||
*/ | ||
import { | ||
javascriptGenerator, | ||
Check failure on line 14 in tests/typescript/src/generators/javascript.ts GitHub Actions / build (ubuntu-latest, 18.x)
|
||
JavascriptGenerator, | ||
Check failure on line 15 in tests/typescript/src/generators/javascript.ts GitHub Actions / build (ubuntu-latest, 18.x)
|
||
Order, | ||
} from 'blockly-test/javascript'; | ||
|
||
/** | ||
* Test: should be able to create a simple block generator function, | ||
* correctly typed, and insert it into the .forBlock dictionary. | ||
*/ | ||
javascriptGenerator.forBlock['the_answer'] = function ( | ||
_block: Blockly.Block, | ||
_generator: JavascriptGenerator, | ||
): [string, Order] { | ||
return ['42', Order.ATOMIC]; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* @license | ||
* Copyright 2024 Google LLC | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import * as Blockly from 'blockly-test/core'; | ||
|
||
/** | ||
* Test: should be able to import a generator instance, class, and | ||
* Order enum. | ||
*/ | ||
import {luaGenerator, LuaGenerator, Order} from 'blockly-test/lua'; | ||
|
||
/** | ||
* Test: should be able to create a simple block generator function, | ||
* correctly typed, and insert it into the .forBlock dictionary. | ||
*/ | ||
luaGenerator.forBlock['the_answer'] = function ( | ||
_block: Blockly.Block, | ||
_generator: LuaGenerator, | ||
): [string, Order] { | ||
return ['42', Order.ATOMIC]; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* @license | ||
* Copyright 2024 Google LLC | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import * as Blockly from 'blockly-test/core'; | ||
|
||
/** | ||
* Test: should be able to import a generator instance, class, and | ||
* Order enum. | ||
*/ | ||
import {phpGenerator, PhpGenerator, Order} from 'blockly-test/php'; | ||
|
||
/** | ||
* Test: should be able to create a simple block generator function, | ||
* correctly typed, and insert it into the .forBlock dictionary. | ||
*/ | ||
phpGenerator.forBlock['the_answer'] = function ( | ||
_block: Blockly.Block, | ||
_generator: PhpGenerator, | ||
): [string, Order] { | ||
return ['42', Order.ATOMIC]; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* @license | ||
* Copyright 2024 Google LLC | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import * as Blockly from 'blockly-test/core'; | ||
|
||
/** | ||
* Test: should be able to import a generator instance, class, and | ||
* Order enum. | ||
*/ | ||
import {pythonGenerator, PythonGenerator, Order} from 'blockly-test/python'; | ||
|
||
/** | ||
* Test: should be able to create a simple block generator function, | ||
* correctly typed, and insert it into the .forBlock dictionary. | ||
*/ | ||
pythonGenerator.forBlock['the_answer'] = function ( | ||
_block: Blockly.Block, | ||
_generator: PythonGenerator, | ||
): [string, Order] { | ||
return ['42', Order.ATOMIC]; | ||
}; |