...

Text file src/cuelang.org/go/cue/testdata/resolve/006_arithmetic.txtar

Documentation: cuelang.org/go/cue/testdata/resolve

     1# DO NOT EDIT; generated by go run testdata/gen.go
     2#
     3#name: arithmetic
     4#evalPartial
     5-- in.cue --
     6v1: 1.0T / 2.0
     7v2: 2.0 == 2
     8n1: 1
     9v5: 2.0 / n1
    10v6: 1.0 / 1.0
    11e2: int & 4.0/2.0
    12-- out/def --
    13v1: 5.0000000000e+11
    14v2: true
    15n1: 1
    16v5: 2.0
    17v6: 1.
    18e2: _|_ // conflicting values int and (4.0 / 2.0) (mismatched types int and float)
    19-- out/legacy-debug --
    20<0>{v1: 5.0000000000e+11, v2: true, n1: 1, v5: 2.0, v6: 1., e2: _|_((int & (4.0 / 2.0)):conflicting values int and (4.0 / 2.0) (mismatched types int and float))}
    21-- out/compile --
    22--- in.cue
    23{
    24  v1: (1000000000000 / 2.0)
    25  v2: (2.0 == 2)
    26  n1: 1
    27  v5: (2.0 / 〈0;n1〉)
    28  v6: (1.0 / 1.0)
    29  e2: (int & (4.0 / 2.0))
    30}
    31-- out/eval/stats --
    32Leaks:  0
    33Freed:  7
    34Reused: 5
    35Allocs: 2
    36Retain: 0
    37
    38Unifications: 7
    39Conjuncts:    8
    40Disjuncts:    7
    41-- out/eval --
    42Errors:
    43e2: conflicting values int and 2.0 (mismatched types int and float):
    44    ./in.cue:6:5
    45    ./in.cue:6:11
    46
    47Result:
    48(_|_){
    49  // [eval]
    50  v1: (float){ 5.0E+11 }
    51  v2: (bool){ true }
    52  n1: (int){ 1 }
    53  v5: (float){ 2.0 }
    54  v6: (float){ 1.0 }
    55  e2: (_|_){
    56    // [eval] e2: conflicting values int and 2.0 (mismatched types int and float):
    57    //     ./in.cue:6:5
    58    //     ./in.cue:6:11
    59  }
    60}

View as plain text