Skip to content

Commit

Permalink
Add test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
dexter2206 committed Jul 5, 2024
1 parent 71ec99b commit d5b8b6b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/qref/data/invalid_yaml_programs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -228,4 +228,13 @@
description: "Target of a paramater link is not namespaced"
error_path: "$.program.linked_params[0].targets[0]"
error_message: "'N' does not match '^([A-Za-z_][A-Za-z0-9_]*\\\\.)+[A-Za-z_][A-Za-z0-9_]*$'"

- input:
version: v1
program:
name: "root"
input_params:
- N
local_variables: ["R = N+1"]
description: Routine uses old format for local_variables
error_path: "$.program.local_variables"
error_message: "['R = N+1'] is not of type 'object'"
18 changes: 18 additions & 0 deletions tests/qref/data/valid_programs/example_5.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
description: Program with local variables
input:
program:
input_params:
- N
- M
name: root
ports:
- direction: input
name: in_0
size: N
- direction: output
name: out_0
size: 2
local_variables:
L: ceil(N/2)
R: M+2
version: v1

0 comments on commit d5b8b6b

Please sign in to comment.