Dever v0.0.2
This commit is contained in:
commit
e6e175ebcf
816 files changed
+120349
No files matched your search
@@ -0,0 +1,12 @@
|
||||
flow shortCircuit() ()
|
||||
| step | kind | do |
|
||||
| selected | loop | app.select(["no", "yes"]) |
|
||||
| - | calc | assertEq(selected, ["yes"]) |
|
||||
| found | loop | app.find(["no", "yes", "explode"]) |
|
||||
| - | calc | assertEq(found, "yes") |
|
||||
|
||||
rule port.accept(value: Text) (accepted: Bool)
|
||||
| value | accepted |
|
||||
| "yes" | true |
|
||||
| "explode" | fail(dever.process.Error.Failed("不应继续调用命中之后的元素")) |
|
||||
| other | false |
|
||||
@@ -0,0 +1,4 @@
|
||||
traversal() () {
|
||||
nodes = [app.Node { id = 1, name = "总部", children = [2, 3] }, app.Node { id = 2, name = "开发", children = [4] }, app.Node { id = 3, name = "测试", children = [4] }, app.Node { id = 4, name = "共享小组", children = [1] }]
|
||||
assertEq(app.names(nodes, 1), ["总部", "开发", "测试", "共享小组"])
|
||||
}
|
||||
Reference in new issue
Block a user