-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow standalone node without pic clause for the supported usage…
… clause allow standalone node without pic clause for the following usage clause: INDEX, POINTER, POINTER_32, PROCEDURE_POINTER, FUNCTION_POINTER, OBJECT_REFERENCE, COMPUTATIONAL_1, COMPUTATIONAL_2, COMP_1, COMP_2 Signed-off-by: ap891843 <aman.prashant@broadcom.com>
- Loading branch information
Showing
5 changed files
with
78 additions
and
9 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
45 changes: 45 additions & 0 deletions
45
.../src/test/java/org/eclipse/lsp/cobol/usecases/TestElementaryVariableWithoutPicClause.java
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright (c) 2024 Broadcom. | ||
* The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Broadcom, Inc. - initial API and implementation | ||
* | ||
*/ | ||
package org.eclipse.lsp.cobol.usecases; | ||
|
||
import com.google.common.collect.ImmutableList; | ||
import com.google.common.collect.ImmutableMap; | ||
import org.eclipse.lsp.cobol.test.engine.UseCaseEngine; | ||
import org.junit.jupiter.api.Test; | ||
|
||
/** Test allowed elementary variables without pic clause */ | ||
public class TestElementaryVariableWithoutPicClause { | ||
public static final String TEXT = | ||
" IDENTIFICATION DIVISION.\n" | ||
+ " PROGRAM-ID. TEST1.\n" | ||
+ " DATA DIVISION.\n" | ||
+ " WORKING-STORAGE SECTION.\n" | ||
+ " 01 {$*PARENT} USAGE POINTER-32.\n" | ||
+ " 01 {$*PARENT2} USAGE POINTER.\n" | ||
+ " 01 {$*PARENT3} USAGE INDEX.\n" | ||
+ " 01 {$*PARENT4} USAGE COMP-1.\n" | ||
+ " 01 {$*PARENT5} USAGE COMPUTATIONAL-1.\n" | ||
+ " 01 {$*PARENT6} USAGE COMPUTATIONAL-2.\n" | ||
+ " 01 {$*PARENT7} USAGE COMP-2.\n" | ||
+ " 01 {$*PARENT8} USAGE PROCEDURE-POINTER.\n" | ||
+ " 01 {$*PARENT9} USAGE FUNCTION-POINTER.\n" | ||
+ " 01 {$*PARENT10} USAGE OBJECT REFERENCE.\n" | ||
+ " PROCEDURE DIVISION.\n"; | ||
|
||
@Test | ||
void test() { | ||
UseCaseEngine.runTest(TEXT, ImmutableList.of(), ImmutableMap.of()); | ||
} | ||
} |
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