mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-07 14:34:35 -06:00
Added tests.
This commit is contained in:
parent
d4575572b6
commit
0e9561194b
16
tests/cases/fourslash/scriptLexicalStructureMissingName1.ts
Normal file
16
tests/cases/fourslash/scriptLexicalStructureMissingName1.ts
Normal file
@ -0,0 +1,16 @@
|
||||
////export function
|
||||
/////**
|
||||
//// * This is a class.
|
||||
//// */
|
||||
////{| "itemName": "C", "kind": "class" |} class C {
|
||||
//// {| "itemName": "foo", "kind": "method" |} foo() {
|
||||
//// }
|
||||
////}
|
||||
|
||||
|
||||
test.markers().forEach((marker) => {
|
||||
verify.getScriptLexicalStructureListContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
});
|
||||
|
||||
/// Only have two named elements.
|
||||
verify.getScriptLexicalStructureListCount(2);
|
||||
11
tests/cases/fourslash/scriptLexicalStructureMissingName2.ts
Normal file
11
tests/cases/fourslash/scriptLexicalStructureMissingName2.ts
Normal file
@ -0,0 +1,11 @@
|
||||
/////**
|
||||
//// * This is a class.
|
||||
//// */
|
||||
////class /* But it has no name! */ {
|
||||
//// foo() {
|
||||
//// }
|
||||
////}
|
||||
|
||||
|
||||
// The class is unnamed, so its method is not included either.
|
||||
verify.getScriptLexicalStructureListCount(0);
|
||||
Loading…
x
Reference in New Issue
Block a user