-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
335 additions
and
18 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
50 changes: 50 additions & 0 deletions
50
internal/runtime/testdata/import_file/import_file_18.txtar
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,50 @@ | ||
Import nested passthrough module with relative import path. | ||
|
||
-- main.alloy -- | ||
testcomponents.count "inc" { | ||
frequency = "10ms" | ||
max = 10 | ||
} | ||
|
||
import.file "testImport" { | ||
filename = "nested_test/module.alloy" | ||
} | ||
|
||
testImport.a "cc" { | ||
input = testcomponents.count.inc.count | ||
} | ||
|
||
testcomponents.summation "sum" { | ||
input = testImport.a.cc.output | ||
} | ||
|
||
-- nested_test/module.alloy -- | ||
import.file "testImport" { | ||
filename = file.path_join(module_path, "utils/module.alloy") | ||
} | ||
|
||
declare "a" { | ||
argument "input" {} | ||
|
||
testImport.a "cc" { | ||
input = argument.input.value | ||
} | ||
|
||
export "output" { | ||
value = testImport.a.cc.output | ||
} | ||
} | ||
|
||
-- nested_test/utils/module.alloy -- | ||
declare "a" { | ||
argument "input" {} | ||
|
||
testcomponents.passthrough "pt" { | ||
input = argument.input.value | ||
lag = "1ms" | ||
} | ||
|
||
export "output" { | ||
value = testcomponents.passthrough.pt.output | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
internal/runtime/testdata/import_file/import_file_19.txtar
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,49 @@ | ||
Import string with import file with relative import path. | ||
|
||
-- main.alloy -- | ||
testcomponents.count "inc" { | ||
frequency = "10ms" | ||
max = 10 | ||
} | ||
|
||
import.string "testImport" { | ||
content = ` | ||
import.file "testImport" { | ||
filename = file.path_join(module_path, "nested_test/module.alloy") | ||
} | ||
|
||
declare "a" { | ||
argument "input" {} | ||
|
||
testImport.a "cc" { | ||
input = argument.input.value | ||
} | ||
|
||
export "output" { | ||
value = testImport.a.cc.output | ||
} | ||
} | ||
` | ||
} | ||
|
||
testImport.a "cc" { | ||
input = testcomponents.count.inc.count | ||
} | ||
|
||
testcomponents.summation "sum" { | ||
input = testImport.a.cc.output | ||
} | ||
|
||
-- nested_test/module.alloy -- | ||
declare "a" { | ||
argument "input" {} | ||
|
||
testcomponents.passthrough "pt" { | ||
input = argument.input.value | ||
lag = "1ms" | ||
} | ||
|
||
export "output" { | ||
value = testcomponents.passthrough.pt.output | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
internal/runtime/testdata/import_file/import_file_20.txtar
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,50 @@ | ||
Import nested passthrough module with relative import path in a declare. | ||
|
||
-- main.alloy -- | ||
testcomponents.count "inc" { | ||
frequency = "10ms" | ||
max = 10 | ||
} | ||
|
||
import.file "testImport" { | ||
filename = "nested_test/module.alloy" | ||
} | ||
|
||
testImport.a "cc" { | ||
input = testcomponents.count.inc.count | ||
} | ||
|
||
testcomponents.summation "sum" { | ||
input = testImport.a.cc.output | ||
} | ||
|
||
-- nested_test/module.alloy -- | ||
declare "a" { | ||
argument "input" {} | ||
|
||
import.file "testImport" { | ||
filename = file.path_join(module_path, "utils/module.alloy") | ||
} | ||
|
||
testImport.a "cc" { | ||
input = argument.input.value | ||
} | ||
|
||
export "output" { | ||
value = testImport.a.cc.output | ||
} | ||
} | ||
|
||
-- nested_test/utils/module.alloy -- | ||
declare "a" { | ||
argument "input" {} | ||
|
||
testcomponents.passthrough "pt" { | ||
input = argument.input.value | ||
lag = "1ms" | ||
} | ||
|
||
export "output" { | ||
value = testcomponents.passthrough.pt.output | ||
} | ||
} |
58 changes: 58 additions & 0 deletions
58
internal/runtime/testdata/import_file_folder/import_file_folder_7.txtar
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,58 @@ | ||
Import nested folder with relative path. | ||
|
||
-- main.alloy -- | ||
testcomponents.count "inc" { | ||
frequency = "10ms" | ||
max = 10 | ||
} | ||
|
||
import.file "testImport" { | ||
filename = "tmpTest" | ||
} | ||
|
||
testImport.a "cc" { | ||
input = testcomponents.count.inc.count | ||
} | ||
|
||
testcomponents.summation "sum" { | ||
input = testImport.a.cc.output | ||
} | ||
|
||
-- module1.alloy -- | ||
import.file "testImport" { | ||
filename = file.path_join(module_path, "utils") | ||
} | ||
declare "a" { | ||
argument "input" {} | ||
|
||
testImport.b "cc" { | ||
input = argument.input.value | ||
} | ||
|
||
export "output" { | ||
value = testImport.b.cc.output | ||
} | ||
} | ||
|
||
-- utils/module2.alloy -- | ||
declare "b" { | ||
argument "input" {} | ||
|
||
testcomponents.passthrough "pt" { | ||
input = argument.input.value | ||
lag = "1ms" | ||
} | ||
|
||
export "output" { | ||
value = testcomponents.passthrough.pt.output | ||
} | ||
} | ||
|
||
-- utils/update_module2.alloy -- | ||
declare "b" { | ||
argument "input" {} | ||
|
||
export "output" { | ||
value = -argument.input.value | ||
} | ||
} |
Oops, something went wrong.