...

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

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

     1#FindHiddenTasks: true
     2-- in.cue --
     3root: {
     4	a: {
     5		$id: "valToOut"
     6		val: "foo"
     7		out: string
     8	}
     9	_b: {
    10		$id:    "valToOut"
    11		$after: a
    12		val:    "bar"
    13		out:    string
    14	}
    15	c: {
    16		$id: "valToOut"
    17		out: a.out + _b.out
    18	}
    19	// These tasks should _not_ run, because they are definitions.
    20	_#c: {
    21		$id: "valToOut"
    22		out: c.out + "baz"
    23	}
    24	#d: {
    25		$id: "valToOut"
    26		out: c.out + "baz"
    27	}
    28}
    29-- out/run/errors --
    30-- out/run/t0 --
    31graph TD
    32  t0("root.a [Ready]")
    33  t1("root._b [Waiting]")
    34  t1-->t0
    35  t2("root.c [Waiting]")
    36  t2-->t0
    37  t2-->t1
    38
    39-- out/run/t1 --
    40graph TD
    41  t0("root.a [Terminated]")
    42  t1("root._b [Ready]")
    43  t1-->t0
    44  t2("root.c [Waiting]")
    45  t2-->t0
    46  t2-->t1
    47
    48-- out/run/t1/value --
    49{
    50	$id: "valToOut"
    51	val: "foo"
    52	out: "foo"
    53}
    54-- out/run/t2 --
    55graph TD
    56  t0("root.a [Terminated]")
    57  t1("root._b [Terminated]")
    58  t1-->t0
    59  t2("root.c [Ready]")
    60  t2-->t0
    61  t2-->t1
    62
    63-- out/run/t2/value --
    64{
    65	$id: "valToOut"
    66	$after: {
    67		$id: "valToOut"
    68		val: "foo"
    69		out: "foo"
    70	}
    71	val: "bar"
    72	out: "bar"
    73}
    74-- out/run/t3 --
    75graph TD
    76  t0("root.a [Terminated]")
    77  t1("root._b [Terminated]")
    78  t1-->t0
    79  t2("root.c [Terminated]")
    80  t2-->t0
    81  t2-->t1
    82
    83-- out/run/t3/value --
    84{
    85	$id: "valToOut"
    86	out: "foobar"
    87}
    88-- out/run/t1/stats --
    89Leaks:  0
    90Freed:  23
    91Reused: 18
    92Allocs: 5
    93Retain: 0
    94
    95Unifications: 23
    96Conjuncts:    42
    97Disjuncts:    23
    98-- out/run/t2/stats --
    99Leaks:  0
   100Freed:  23
   101Reused: 23
   102Allocs: 0
   103Retain: 0
   104
   105Unifications: 23
   106Conjuncts:    34
   107Disjuncts:    23
   108-- out/run/t3/stats --
   109Leaks:  0
   110Freed:  0
   111Reused: 0
   112Allocs: 0
   113Retain: 0
   114
   115Unifications: 0
   116Conjuncts:    0
   117Disjuncts:    0
   118-- out/run/stats/totals --
   119Leaks:  0
   120Freed:  46
   121Reused: 41
   122Allocs: 5
   123Retain: 0
   124
   125Unifications: 46
   126Conjuncts:    76
   127Disjuncts:    46

View as plain text