...

Text file src/cuelang.org/go/tools/flow/testdata/dynamic.txtar

Documentation: cuelang.org/go/tools/flow/testdata

     1-- in.cue --
     2root: {
     3	a: {
     4		$id: "list"
     5		out: [...int]
     6	}
     7	middle: {
     8		for x in a.out if x > 1 {
     9			"la\(x)": {
    10				$id: "sequenced"
    11				seq: x
    12				val: "foo\(x)"
    13			}
    14		}
    15	}
    16	// Run this after all generated tasks (so far)
    17	b: {
    18		$id: "list"
    19		$after: [for x in middle {x}]
    20		out: [...int]
    21	}
    22	after: {
    23		for x in b.out if x > 1 {
    24			"lb\(x)": {
    25				$id: "valToOut"
    26				val: "foo\(x)"
    27			}
    28		}
    29	}
    30}
    31-- out/run/errors --
    32-- out/run/t0 --
    33graph TD
    34  t0("root.a [Ready]")
    35  t1("root.b [Waiting]")
    36  t1-->t0
    37
    38-- out/run/t1 --
    39graph TD
    40  t0("root.a [Terminated]")
    41  t1("root.b [Waiting]")
    42  t1-->t0
    43  t1-->t2
    44  t2("root.middle.la2 [Ready]")
    45  t2-->t0
    46
    47-- out/run/t1/value --
    48{
    49	$id: "list"
    50	out: [1, 2]
    51}
    52-- out/run/t2 --
    53graph TD
    54  t0("root.a [Terminated]")
    55  t1("root.b [Ready]")
    56  t1-->t0
    57  t1-->t2
    58  t2("root.middle.la2 [Terminated]")
    59  t2-->t0
    60
    61-- out/run/t2/value --
    62{
    63	$id: "sequenced"
    64	seq: 2
    65	out: "foo2"
    66	val: "foo2"
    67}
    68-- out/run/t3 --
    69graph TD
    70  t0("root.a [Terminated]")
    71  t1("root.b [Terminated]")
    72  t1-->t0
    73  t1-->t2
    74  t2("root.middle.la2 [Terminated]")
    75  t2-->t0
    76  t3("root.after.lb2 [Ready]")
    77  t3-->t1
    78
    79-- out/run/t3/value --
    80{
    81	$id: "list"
    82	$after: [{
    83		$id: "sequenced"
    84		seq: 2
    85		out: "foo2"
    86		val: "foo2"
    87	}]
    88	out: [1, 2]
    89}
    90-- out/run/t4 --
    91graph TD
    92  t0("root.a [Terminated]")
    93  t1("root.b [Terminated]")
    94  t1-->t0
    95  t1-->t2
    96  t2("root.middle.la2 [Terminated]")
    97  t2-->t0
    98  t3("root.after.lb2 [Terminated]")
    99  t3-->t1
   100
   101-- out/run/t4/value --
   102{
   103	$id: "valToOut"
   104	out: "foo2"
   105	val: "foo2"
   106}
   107-- out/run/t1/stats --
   108Leaks:  0
   109Freed:  24
   110Reused: 16
   111Allocs: 8
   112Retain: 0
   113
   114Unifications: 24
   115Conjuncts:    38
   116Disjuncts:    24
   117-- out/run/t2/stats --
   118Leaks:  0
   119Freed:  23
   120Reused: 23
   121Allocs: 0
   122Retain: 0
   123
   124Unifications: 23
   125Conjuncts:    42
   126Disjuncts:    23
   127-- out/run/t3/stats --
   128Leaks:  0
   129Freed:  31
   130Reused: 29
   131Allocs: 2
   132Retain: 0
   133
   134Unifications: 31
   135Conjuncts:    58
   136Disjuncts:    31
   137-- out/run/t4/stats --
   138Leaks:  0
   139Freed:  29
   140Reused: 29
   141Allocs: 0
   142Retain: 0
   143
   144Unifications: 29
   145Conjuncts:    60
   146Disjuncts:    29
   147-- out/run/stats/totals --
   148Leaks:  0
   149Freed:  107
   150Reused: 97
   151Allocs: 10
   152Retain: 0
   153
   154Unifications: 107
   155Conjuncts:    198
   156Disjuncts:    107

View as plain text