コード例 #1
0
func (suite *MathLogicMathSuite) TestCases() {
	suite.T().Log("Running MathLogicMathSuite: Tests of nested arithmetic expressions")

	{
		// math_logic/math.yaml line #4
		/* 1 */
		var expected_ int = 1
		/* (((4 + 2 * (r.expr(26) % 18)) / 5) - 3) */

		suite.T().Log("About to run line #4: r.Add(4, r.Mul(2, r.Expr(26).Mod(18))).Div(5).Sub(3)")

		runAndAssert(suite.Suite, expected_, r.Add(4, r.Mul(2, r.Expr(26).Mod(18))).Div(5).Sub(3), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #4")
	}
}
コード例 #2
0
func (suite *DatumObjectSuite) TestCases() {
	suite.T().Log("Running DatumObjectSuite: Tests conversion to and from the RQL object type")

	{
		// datum/object.yaml line #6
		/* {} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{}
		/* r.expr({}) */

		suite.T().Log("About to run line #6: r.Expr(map[interface{}]interface{}{})")

		runAndAssert(suite.Suite, expected_, r.Expr(map[interface{}]interface{}{}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #6")
	}

	{
		// datum/object.yaml line #11
		/* {'a':1} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"a": 1}
		/* r.expr({'a':1}) */

		suite.T().Log("About to run line #11: r.Expr(map[interface{}]interface{}{'a': 1, })")

		runAndAssert(suite.Suite, expected_, r.Expr(map[interface{}]interface{}{"a": 1}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #11")
	}

	{
		// datum/object.yaml line #16
		/* {'a':1, 'b':'two', 'c':True} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"a": 1, "b": "two", "c": true}
		/* r.expr({'a':1, 'b':'two', 'c':True}) */

		suite.T().Log("About to run line #16: r.Expr(map[interface{}]interface{}{'a': 1, 'b': 'two', 'c': true, })")

		runAndAssert(suite.Suite, expected_, r.Expr(map[interface{}]interface{}{"a": 1, "b": "two", "c": true}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #16")
	}

	{
		// datum/object.yaml line #20
		/* {'a':1} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"a": 1}
		/* r.expr({'a':r.expr(1)}) */

		suite.T().Log("About to run line #20: r.Expr(map[interface{}]interface{}{'a': r.Expr(1), })")

		runAndAssert(suite.Suite, expected_, r.Expr(map[interface{}]interface{}{"a": r.Expr(1)}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #20")
	}

	{
		// datum/object.yaml line #23
		/* {'a':{'b':[{'c':2}, 'a', 4]}} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"a": map[interface{}]interface{}{"b": []interface{}{map[interface{}]interface{}{"c": 2}, "a", 4}}}
		/* r.expr({'a':{'b':[{'c':2}, 'a', 4]}}) */

		suite.T().Log("About to run line #23: r.Expr(map[interface{}]interface{}{'a': map[interface{}]interface{}{'b': []interface{}{map[interface{}]interface{}{'c': 2, }, 'a', 4}, }, })")

		runAndAssert(suite.Suite, expected_, r.Expr(map[interface{}]interface{}{"a": map[interface{}]interface{}{"b": []interface{}{map[interface{}]interface{}{"c": 2}, "a", 4}}}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #23")
	}

	{
		// datum/object.yaml line #26
		/* 'OBJECT' */
		var expected_ string = "OBJECT"
		/* r.expr({'a':1}).type_of() */

		suite.T().Log("About to run line #26: r.Expr(map[interface{}]interface{}{'a': 1, }).TypeOf()")

		runAndAssert(suite.Suite, expected_, r.Expr(map[interface{}]interface{}{"a": 1}).TypeOf(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #26")
	}

	{
		// datum/object.yaml line #30
		/* '{"a":1}' */
		var expected_ string = "{\"a\":1}"
		/* r.expr({'a':1}).coerce_to('string') */

		suite.T().Log("About to run line #30: r.Expr(map[interface{}]interface{}{'a': 1, }).CoerceTo('string')")

		runAndAssert(suite.Suite, expected_, r.Expr(map[interface{}]interface{}{"a": 1}).CoerceTo("string"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #30")
	}

	{
		// datum/object.yaml line #34
		/* {'a':1} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"a": 1}
		/* r.expr({'a':1}).coerce_to('object') */

		suite.T().Log("About to run line #34: r.Expr(map[interface{}]interface{}{'a': 1, }).CoerceTo('object')")

		runAndAssert(suite.Suite, expected_, r.Expr(map[interface{}]interface{}{"a": 1}).CoerceTo("object"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #34")
	}

	{
		// datum/object.yaml line #37
		/* [['a',1]] */
		var expected_ []interface{} = []interface{}{[]interface{}{"a", 1}}
		/* r.expr({'a':1}).coerce_to('array') */

		suite.T().Log("About to run line #37: r.Expr(map[interface{}]interface{}{'a': 1, }).CoerceTo('array')")

		runAndAssert(suite.Suite, expected_, r.Expr(map[interface{}]interface{}{"a": 1}).CoerceTo("array"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #37")
	}

	{
		// datum/object.yaml line #66
		/* {} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{}
		/* r.object() */

		suite.T().Log("About to run line #66: r.Object()")

		runAndAssert(suite.Suite, expected_, r.Object(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #66")
	}

	{
		// datum/object.yaml line #69
		/* {'a':1,'b':2} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"a": 1, "b": 2}
		/* r.object('a', 1, 'b', 2) */

		suite.T().Log("About to run line #69: r.Object('a', 1, 'b', 2)")

		runAndAssert(suite.Suite, expected_, r.Object("a", 1, "b", 2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #69")
	}

	{
		// datum/object.yaml line #72
		/* {'cd':3} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"cd": 3}
		/* r.object('c'+'d', 3) */

		suite.T().Log("About to run line #72: r.Object(r.Add('c', 'd'), 3)")

		runAndAssert(suite.Suite, expected_, r.Object(r.Add("c", "d"), 3), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #72")
	}

	{
		// datum/object.yaml line #75
		/* err("ReqlQueryLogicError", "OBJECT expects an even number of arguments (but found 3).", []) */
		var expected_ Err = err("ReqlQueryLogicError", "OBJECT expects an even number of arguments (but found 3).")
		/* r.object('o','d','d') */

		suite.T().Log("About to run line #75: r.Object('o', 'd', 'd')")

		runAndAssert(suite.Suite, expected_, r.Object("o", "d", "d"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #75")
	}

	{
		// datum/object.yaml line #78
		/* err("ReqlQueryLogicError","Expected type STRING but found NUMBER.",[]) */
		var expected_ Err = err("ReqlQueryLogicError", "Expected type STRING but found NUMBER.")
		/* r.object(1, 1) */

		suite.T().Log("About to run line #78: r.Object(1, 1)")

		runAndAssert(suite.Suite, expected_, r.Object(1, 1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #78")
	}

	{
		// datum/object.yaml line #81
		/* err("ReqlQueryLogicError","Duplicate key \"e\" in object.  (got 4 and 5 as values)",[]) */
		var expected_ Err = err("ReqlQueryLogicError", "Duplicate key \"e\" in object.  (got 4 and 5 as values)")
		/* r.object('e', 4, 'e', 5) */

		suite.T().Log("About to run line #81: r.Object('e', 4, 'e', 5)")

		runAndAssert(suite.Suite, expected_, r.Object("e", 4, "e", 5), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #81")
	}

	{
		// datum/object.yaml line #84
		/* err("ReqlQueryLogicError","Expected type DATUM but found DATABASE:",[]) */
		var expected_ Err = err("ReqlQueryLogicError", "Expected type DATUM but found DATABASE:")
		/* r.object('g', r.db('test')) */

		suite.T().Log("About to run line #84: r.Object('g', r.DB('test'))")

		runAndAssert(suite.Suite, expected_, r.Object("g", r.DB("test")), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #84")
	}
}
コード例 #3
0
func (suite *TimesTimeArithSuite) TestCases() {
	suite.T().Log("Running TimesTimeArithSuite: Test basic time arithmetic")

	// times/time_arith.yaml line #3
	// rt1 = 1375147296.681
	suite.T().Log("Possibly executing: var rt1 float64 = 1375147296.681")

	rt1 := 1375147296.681
	_ = rt1 // Prevent any noused variable errors

	// times/time_arith.yaml line #4
	// rt2 = 1375147296.682
	suite.T().Log("Possibly executing: var rt2 float64 = 1375147296.682")

	rt2 := 1375147296.682
	_ = rt2 // Prevent any noused variable errors

	// times/time_arith.yaml line #5
	// rt3 = 1375147297.681
	suite.T().Log("Possibly executing: var rt3 float64 = 1375147297.681")

	rt3 := 1375147297.681
	_ = rt3 // Prevent any noused variable errors

	// times/time_arith.yaml line #6
	// rt4 = 2375147296.681
	suite.T().Log("Possibly executing: var rt4 float64 = 2375147296.681")

	rt4 := 2375147296.681
	_ = rt4 // Prevent any noused variable errors

	// times/time_arith.yaml line #7
	// rts = [rt1, rt2, rt3, rt4]
	suite.T().Log("Possibly executing: var rts []interface{} = []interface{}{rt1, rt2, rt3, rt4}")

	rts := []interface{}{rt1, rt2, rt3, rt4}
	_ = rts // Prevent any noused variable errors

	// times/time_arith.yaml line #9
	// t1 = r.epoch_time(rt1)
	suite.T().Log("Possibly executing: var t1 r.Term = r.EpochTime(rt1)")

	t1 := r.EpochTime(rt1)
	_ = t1 // Prevent any noused variable errors

	// times/time_arith.yaml line #10
	// t2 = r.epoch_time(rt2)
	suite.T().Log("Possibly executing: var t2 r.Term = r.EpochTime(rt2)")

	t2 := r.EpochTime(rt2)
	_ = t2 // Prevent any noused variable errors

	// times/time_arith.yaml line #11
	// t3 = r.epoch_time(rt3)
	suite.T().Log("Possibly executing: var t3 r.Term = r.EpochTime(rt3)")

	t3 := r.EpochTime(rt3)
	_ = t3 // Prevent any noused variable errors

	// times/time_arith.yaml line #12
	// t4 = r.epoch_time(rt4)
	suite.T().Log("Possibly executing: var t4 r.Term = r.EpochTime(rt4)")

	t4 := r.EpochTime(rt4)
	_ = t4 // Prevent any noused variable errors

	// times/time_arith.yaml line #13
	// ts = r.expr([t1, t2, t3, t4])
	suite.T().Log("Possibly executing: var ts r.Term = r.Expr([]interface{}{t1, t2, t3, t4})")

	ts := r.Expr([]interface{}{t1, t2, t3, t4})
	_ = ts // Prevent any noused variable errors

	{
		// times/time_arith.yaml line #17
		/* true */
		var expected_ bool = true
		/* ((t2 - t1) * 1000).do(lambda x:(x > 0.99) & (x < 1.01)) */

		suite.T().Log("About to run line #17: r.Sub(t2, t1).Mul(1000).Do(func(x r.Term) interface{} { return r.Gt(x, 0.99).And(r.Lt(x, 1.01))})")

		runAndAssert(suite.Suite, expected_, r.Sub(t2, t1).Mul(1000).Do(func(x r.Term) interface{} { return r.Gt(x, 0.99).And(r.Lt(x, 1.01)) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #17")
	}

	{
		// times/time_arith.yaml line #20
		/* 1 */
		var expected_ int = 1
		/* t3 - t1 */

		suite.T().Log("About to run line #20: r.Sub(t3, t1)")

		runAndAssert(suite.Suite, expected_, r.Sub(t3, t1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #20")
	}

	{
		// times/time_arith.yaml line #23
		/* 1000000000 */
		var expected_ int = 1000000000
		/* t4 - t1 */

		suite.T().Log("About to run line #23: r.Sub(t4, t1)")

		runAndAssert(suite.Suite, expected_, r.Sub(t4, t1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #23")
	}

	{
		// times/time_arith.yaml line #28
		/* true */
		var expected_ bool = true
		/* ((t1 - t2) * 1000).do(lambda x:(x < -0.99) & (x > -1.01)) */

		suite.T().Log("About to run line #28: r.Sub(t1, t2).Mul(1000).Do(func(x r.Term) interface{} { return r.Lt(x, -0.99).And(r.Gt(x, -1.01))})")

		runAndAssert(suite.Suite, expected_, r.Sub(t1, t2).Mul(1000).Do(func(x r.Term) interface{} { return r.Lt(x, -0.99).And(r.Gt(x, -1.01)) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #28")
	}

	{
		// times/time_arith.yaml line #31
		/* -1 */
		var expected_ int = -1
		/* t1 - t3 */

		suite.T().Log("About to run line #31: r.Sub(t1, t3)")

		runAndAssert(suite.Suite, expected_, r.Sub(t1, t3), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #31")
	}

	{
		// times/time_arith.yaml line #34
		/* -1000000000 */
		var expected_ int = -1000000000
		/* t1 - t4 */

		suite.T().Log("About to run line #34: r.Sub(t1, t4)")

		runAndAssert(suite.Suite, expected_, r.Sub(t1, t4), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #34")
	}

	{
		// times/time_arith.yaml line #39
		/* ([rt1, rt2, rt3, rt4]) */
		var expected_ []interface{} = []interface{}{rt1, rt2, rt3, rt4}
		/* ts.map(lambda x:t1 + (x - t1)).map(lambda x:x.to_epoch_time()) */

		suite.T().Log("About to run line #39: ts.Map(func(x r.Term) interface{} { return r.Add(t1, r.Sub(x, t1))}).Map(func(x r.Term) interface{} { return x.ToEpochTime()})")

		runAndAssert(suite.Suite, expected_, ts.Map(func(x r.Term) interface{} { return r.Add(t1, r.Sub(x, t1)) }).Map(func(x r.Term) interface{} { return x.ToEpochTime() }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #39")
	}

	{
		// times/time_arith.yaml line #43
		/* err("ReqlQueryLogicError", "Expected type NUMBER but found PTYPE<TIME>.", []) */
		var expected_ Err = err("ReqlQueryLogicError", "Expected type NUMBER but found PTYPE<TIME>.")
		/* ts.map(lambda x:(t1 + x) - t1).map(lambda x:x.to_epoch_time()) */

		suite.T().Log("About to run line #43: ts.Map(func(x r.Term) interface{} { return r.Add(t1, x).Sub(t1)}).Map(func(x r.Term) interface{} { return x.ToEpochTime()})")

		runAndAssert(suite.Suite, expected_, ts.Map(func(x r.Term) interface{} { return r.Add(t1, x).Sub(t1) }).Map(func(x r.Term) interface{} { return x.ToEpochTime() }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #43")
	}

	{
		// times/time_arith.yaml line #47
		/* ([rt1, rt2, rt3, rt4]) */
		var expected_ []interface{} = []interface{}{rt1, rt2, rt3, rt4}
		/* ts.map(lambda x:t1 - (t1 - x)).map(lambda x:x.to_epoch_time()) */

		suite.T().Log("About to run line #47: ts.Map(func(x r.Term) interface{} { return r.Sub(t1, r.Sub(t1, x))}).Map(func(x r.Term) interface{} { return x.ToEpochTime()})")

		runAndAssert(suite.Suite, expected_, ts.Map(func(x r.Term) interface{} { return r.Sub(t1, r.Sub(t1, x)) }).Map(func(x r.Term) interface{} { return x.ToEpochTime() }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #47")
	}

	{
		// times/time_arith.yaml line #52
		/* ([[[false, true,  true,  false, true,  false],
		[true,  true,  false, true,  false, false],
		[true,  true,  false, true,  false, false],
		[true,  true,  false, true,  false, false]],
		[[false, false, false, true,  true,  true],
		[false, true,  true,  false, true,  false],
		[true,  true,  false, true,  false, false],
		[true,  true,  false, true,  false, false]],
		[[false, false, false, true,  true,  true],
		[false, false, false, true,  true,  true],
		[false, true,  true,  false, true,  false],
		[true,  true,  false, true,  false, false]],
		[[false, false, false, true,  true,  true],
		[false, false, false, true,  true,  true],
		[false, false, false, true,  true,  true],
		[false, true,  true,  false, true,  false]]]) */
		var expected_ []interface{} = []interface{}{[]interface{}{[]interface{}{false, true, true, false, true, false}, []interface{}{true, true, false, true, false, false}, []interface{}{true, true, false, true, false, false}, []interface{}{true, true, false, true, false, false}}, []interface{}{[]interface{}{false, false, false, true, true, true}, []interface{}{false, true, true, false, true, false}, []interface{}{true, true, false, true, false, false}, []interface{}{true, true, false, true, false, false}}, []interface{}{[]interface{}{false, false, false, true, true, true}, []interface{}{false, false, false, true, true, true}, []interface{}{false, true, true, false, true, false}, []interface{}{true, true, false, true, false, false}}, []interface{}{[]interface{}{false, false, false, true, true, true}, []interface{}{false, false, false, true, true, true}, []interface{}{false, false, false, true, true, true}, []interface{}{false, true, true, false, true, false}}}
		/* ts.map(lambda x:ts.map(lambda y:[x < y, x <= y, x == y, x != y, x >= y, x > y])) */

		suite.T().Log("About to run line #52: ts.Map(func(x r.Term) interface{} { return ts.Map(func(y r.Term) interface{} { return []interface{}{r.Lt(x, y), r.Le(x, y), r.Eq(x, y), r.Ne(x, y), r.Ge(x, y), r.Gt(x, y)}})})")

		runAndAssert(suite.Suite, expected_, ts.Map(func(x r.Term) interface{} {
			return ts.Map(func(y r.Term) interface{} {
				return []interface{}{r.Lt(x, y), r.Le(x, y), r.Eq(x, y), r.Ne(x, y), r.Ge(x, y), r.Gt(x, y)}
			})
		}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #52")
	}

	// times/time_arith.yaml line #73
	// datum_types = r.expr([null, true, false, 1, "1", [1], {"1":1}, r.binary(b'')])
	suite.T().Log("Possibly executing: var datum_types r.Term = r.Expr([]interface{}{nil, true, false, 1, '1', []interface{}{1}, map[interface{}]interface{}{'1': 1, }, r.Binary([]byte{})})")

	datum_types := r.Expr([]interface{}{nil, true, false, 1, "1", []interface{}{1}, map[interface{}]interface{}{"1": 1}, r.Binary([]byte{})})
	_ = datum_types // Prevent any noused variable errors

	{
		// times/time_arith.yaml line #79
		/* ([[[true,  true,  false, true,  false, false],
		[false, false, false, true,  true,  true]],
		[[true,  true,  false, true,  false, false],
		[false, false, false, true,  true,  true]],
		[[true,  true,  false, true,  false, false],
		[false, false, false, true,  true,  true]],
		[[true,  true,  false, true,  false, false],
		[false, false, false, true,  true,  true]],
		[[false, false, false, true,  true,  true],
		[true,  true,  false, true,  false, false]],
		[[true,  true,  false, true,  false, false],
		[false, false, false, true,  true,  true]],
		[[true,  true,  false, true,  false, false],
		[false, false, false, true,  true,  true]],
		[[true,  true,  false, true,  false, false],
		[false, false, false, true,  true,  true]]]) */
		var expected_ []interface{} = []interface{}{[]interface{}{[]interface{}{true, true, false, true, false, false}, []interface{}{false, false, false, true, true, true}}, []interface{}{[]interface{}{true, true, false, true, false, false}, []interface{}{false, false, false, true, true, true}}, []interface{}{[]interface{}{true, true, false, true, false, false}, []interface{}{false, false, false, true, true, true}}, []interface{}{[]interface{}{true, true, false, true, false, false}, []interface{}{false, false, false, true, true, true}}, []interface{}{[]interface{}{false, false, false, true, true, true}, []interface{}{true, true, false, true, false, false}}, []interface{}{[]interface{}{true, true, false, true, false, false}, []interface{}{false, false, false, true, true, true}}, []interface{}{[]interface{}{true, true, false, true, false, false}, []interface{}{false, false, false, true, true, true}}, []interface{}{[]interface{}{true, true, false, true, false, false}, []interface{}{false, false, false, true, true, true}}}
		/* datum_types.map(lambda x:r.expr([[x, t1], [t1, x]]).map(lambda xy:xy[0].do(lambda x2:xy[1].do(lambda y:[x2 < y, x2 <= y, x2 == y, x2 != y, x2 >= y, x2 > y])))) */

		suite.T().Log("About to run line #79: datum_types.Map(func(x r.Term) interface{} { return r.Expr([]interface{}{[]interface{}{x, t1}, []interface{}{t1, x}}).Map(func(xy r.Term) interface{} { return xy.AtIndex(0).Do(func(x2 r.Term) interface{} { return xy.AtIndex(1).Do(func(y r.Term) interface{} { return []interface{}{r.Lt(x2, y), r.Le(x2, y), r.Eq(x2, y), r.Ne(x2, y), r.Ge(x2, y), r.Gt(x2, y)}})})})})")

		runAndAssert(suite.Suite, expected_, datum_types.Map(func(x r.Term) interface{} {
			return r.Expr([]interface{}{[]interface{}{x, t1}, []interface{}{t1, x}}).Map(func(xy r.Term) interface{} {
				return xy.AtIndex(0).Do(func(x2 r.Term) interface{} {
					return xy.AtIndex(1).Do(func(y r.Term) interface{} {
						return []interface{}{r.Lt(x2, y), r.Le(x2, y), r.Eq(x2, y), r.Ne(x2, y), r.Ge(x2, y), r.Gt(x2, y)}
					})
				})
			})
		}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #79")
	}

	{
		// times/time_arith.yaml line #99
		/* ([[[false, true,  true,  true],
		[false, false, true,  true],
		[false, false, false, true],
		[false, false, false, false]],
		[[false, false, false, false],
		[false, false, true,  true],
		[false, false, false, true],
		[false, false, false, false]],
		[[false, false, false, false],
		[false, false, false, false],
		[false, false, false, true],
		[false, false, false, false]],
		[[false, false, false, false],
		[false, false, false, false],
		[false, false, false, false],
		[false, false, false, false]]]) */
		var expected_ []interface{} = []interface{}{[]interface{}{[]interface{}{false, true, true, true}, []interface{}{false, false, true, true}, []interface{}{false, false, false, true}, []interface{}{false, false, false, false}}, []interface{}{[]interface{}{false, false, false, false}, []interface{}{false, false, true, true}, []interface{}{false, false, false, true}, []interface{}{false, false, false, false}}, []interface{}{[]interface{}{false, false, false, false}, []interface{}{false, false, false, false}, []interface{}{false, false, false, true}, []interface{}{false, false, false, false}}, []interface{}{[]interface{}{false, false, false, false}, []interface{}{false, false, false, false}, []interface{}{false, false, false, false}, []interface{}{false, false, false, false}}}
		/* ts.map(lambda a:ts.map(lambda b:ts.map(lambda c:b.during(a, c)))) */

		suite.T().Log("About to run line #99: ts.Map(func(a r.Term) interface{} { return ts.Map(func(b r.Term) interface{} { return ts.Map(func(c r.Term) interface{} { return b.During(a, c)})})})")

		runAndAssert(suite.Suite, expected_, ts.Map(func(a r.Term) interface{} {
			return ts.Map(func(b r.Term) interface{} { return ts.Map(func(c r.Term) interface{} { return b.During(a, c) }) })
		}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #99")
	}

	{
		// times/time_arith.yaml line #119
		/* ([[[false, false, false, false],
		[false, false, true,  true],
		[false, false, false, true],
		[false, false, false, false]],
		[[false, false, false, false],
		[false, false, false, false],
		[false, false, false, true],
		[false, false, false, false]],
		[[false, false, false, false],
		[false, false, false, false],
		[false, false, false, false],
		[false, false, false, false]],
		[[false, false, false, false],
		[false, false, false, false],
		[false, false, false, false],
		[false, false, false, false]]]) */
		var expected_ []interface{} = []interface{}{[]interface{}{[]interface{}{false, false, false, false}, []interface{}{false, false, true, true}, []interface{}{false, false, false, true}, []interface{}{false, false, false, false}}, []interface{}{[]interface{}{false, false, false, false}, []interface{}{false, false, false, false}, []interface{}{false, false, false, true}, []interface{}{false, false, false, false}}, []interface{}{[]interface{}{false, false, false, false}, []interface{}{false, false, false, false}, []interface{}{false, false, false, false}, []interface{}{false, false, false, false}}, []interface{}{[]interface{}{false, false, false, false}, []interface{}{false, false, false, false}, []interface{}{false, false, false, false}, []interface{}{false, false, false, false}}}
		/* ts.map(lambda a:ts.map(lambda b:ts.map(lambda c:b.during(a, c, left_bound='open')))) */

		suite.T().Log("About to run line #119: ts.Map(func(a r.Term) interface{} { return ts.Map(func(b r.Term) interface{} { return ts.Map(func(c r.Term) interface{} { return b.During(a, c).OptArgs(r.DuringOpts{LeftBound: 'open', })})})})")

		runAndAssert(suite.Suite, expected_, ts.Map(func(a r.Term) interface{} {
			return ts.Map(func(b r.Term) interface{} {
				return ts.Map(func(c r.Term) interface{} { return b.During(a, c).OptArgs(r.DuringOpts{LeftBound: "open"}) })
			})
		}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #119")
	}

	{
		// times/time_arith.yaml line #139
		/* ([[[true,  true,  true,  true],
		[false, true,  true,  true],
		[false, false, true,  true],
		[false, false, false, true]],
		[[false, false, false, false],
		[false, true,  true,  true],
		[false, false, true,  true],
		[false, false, false, true]],
		[[false, false, false, false],
		[false, false, false, false],
		[false, false, true,  true],
		[false, false, false, true]],
		[[false, false, false, false],
		[false, false, false, false],
		[false, false, false, false],
		[false, false, false, true]]]) */
		var expected_ []interface{} = []interface{}{[]interface{}{[]interface{}{true, true, true, true}, []interface{}{false, true, true, true}, []interface{}{false, false, true, true}, []interface{}{false, false, false, true}}, []interface{}{[]interface{}{false, false, false, false}, []interface{}{false, true, true, true}, []interface{}{false, false, true, true}, []interface{}{false, false, false, true}}, []interface{}{[]interface{}{false, false, false, false}, []interface{}{false, false, false, false}, []interface{}{false, false, true, true}, []interface{}{false, false, false, true}}, []interface{}{[]interface{}{false, false, false, false}, []interface{}{false, false, false, false}, []interface{}{false, false, false, false}, []interface{}{false, false, false, true}}}
		/* ts.map(lambda a:ts.map(lambda b:ts.map(lambda c:b.during(a, c, right_bound='closed')))) */

		suite.T().Log("About to run line #139: ts.Map(func(a r.Term) interface{} { return ts.Map(func(b r.Term) interface{} { return ts.Map(func(c r.Term) interface{} { return b.During(a, c).OptArgs(r.DuringOpts{RightBound: 'closed', })})})})")

		runAndAssert(suite.Suite, expected_, ts.Map(func(a r.Term) interface{} {
			return ts.Map(func(b r.Term) interface{} {
				return ts.Map(func(c r.Term) interface{} { return b.During(a, c).OptArgs(r.DuringOpts{RightBound: "closed"}) })
			})
		}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #139")
	}

	{
		// times/time_arith.yaml line #159
		/* ([[[false, false, false, false],
		[false, true,  true,  true],
		[false, false, true,  true],
		[false, false, false, true]],
		[[false, false, false, false],
		[false, false, false, false],
		[false, false, true,  true],
		[false, false, false, true]],
		[[false, false, false, false],
		[false, false, false, false],
		[false, false, false, false],
		[false, false, false, true]],
		[[false, false, false, false],
		[false, false, false, false],
		[false, false, false, false],
		[false, false, false, false]]]) */
		var expected_ []interface{} = []interface{}{[]interface{}{[]interface{}{false, false, false, false}, []interface{}{false, true, true, true}, []interface{}{false, false, true, true}, []interface{}{false, false, false, true}}, []interface{}{[]interface{}{false, false, false, false}, []interface{}{false, false, false, false}, []interface{}{false, false, true, true}, []interface{}{false, false, false, true}}, []interface{}{[]interface{}{false, false, false, false}, []interface{}{false, false, false, false}, []interface{}{false, false, false, false}, []interface{}{false, false, false, true}}, []interface{}{[]interface{}{false, false, false, false}, []interface{}{false, false, false, false}, []interface{}{false, false, false, false}, []interface{}{false, false, false, false}}}
		/* ts.map(lambda a:ts.map(lambda b:ts.map(lambda c:b.during(a, c, left_bound='open', right_bound='closed')))) */

		suite.T().Log("About to run line #159: ts.Map(func(a r.Term) interface{} { return ts.Map(func(b r.Term) interface{} { return ts.Map(func(c r.Term) interface{} { return b.During(a, c).OptArgs(r.DuringOpts{LeftBound: 'open', RightBound: 'closed', })})})})")

		runAndAssert(suite.Suite, expected_, ts.Map(func(a r.Term) interface{} {
			return ts.Map(func(b r.Term) interface{} {
				return ts.Map(func(c r.Term) interface{} {
					return b.During(a, c).OptArgs(r.DuringOpts{LeftBound: "open", RightBound: "closed"})
				})
			})
		}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #159")
	}

	{
		// times/time_arith.yaml line #179
		/* rts */
		var expected_ []interface{} = rts
		/* ts.map(lambda x:x.date() + x.time_of_day()).map(lambda x:x.to_epoch_time()) */

		suite.T().Log("About to run line #179: ts.Map(func(x r.Term) interface{} { return x.Date().Add(x.TimeOfDay())}).Map(func(x r.Term) interface{} { return x.ToEpochTime()})")

		runAndAssert(suite.Suite, expected_, ts.Map(func(x r.Term) interface{} { return x.Date().Add(x.TimeOfDay()) }).Map(func(x r.Term) interface{} { return x.ToEpochTime() }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #179")
	}

	{
		// times/time_arith.yaml line #185
		/* rt1 */
		var expected_ float64 = rt1
		/* r.epoch_time(rt1).do(r.js("(function(data){return data})")).to_epoch_time() */

		suite.T().Log("About to run line #185: r.EpochTime(rt1).Do(r.JS('(function(data){return data})')).ToEpochTime()")

		runAndAssert(suite.Suite, expected_, r.EpochTime(rt1).Do(r.JS("(function(data){return data})")).ToEpochTime(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #185")
	}

	{
		// times/time_arith.yaml line #190
		/* ("2012-08-01T00:00:00+00:00") */
		var expected_ string = "2012-08-01T00:00:00+00:00"
		/* r.do(r.js("new Date('2012-08-01')")).to_iso8601() */

		suite.T().Log("About to run line #190: r.Do(r.JS('new Date('2012-08-01')')).ToISO8601()")

		runAndAssert(suite.Suite, expected_, r.Do(r.JS("new Date('2012-08-01')")).ToISO8601(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #190")
	}

	{
		// times/time_arith.yaml line #195
		/* ("2012-08-01T00:00:00+00:00") */
		var expected_ string = "2012-08-01T00:00:00+00:00"
		/* r.do(r.js("(function(x){doc = new Object(); doc.date = new Date('2012-08-01'); return doc;})"))["date"].to_iso8601() */

		suite.T().Log("About to run line #195: r.Do(r.JS('(function(x){doc = new Object(); doc.date = new Date('2012-08-01'); return doc;})')).AtIndex('date').ToISO8601()")

		runAndAssert(suite.Suite, expected_, r.Do(r.JS("(function(x){doc = new Object(); doc.date = new Date('2012-08-01'); return doc;})")).AtIndex("date").ToISO8601(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #195")
	}
}
コード例 #4
0
func (suite *TransformFoldSuite) TestCases() {
	suite.T().Log("Running TransformFoldSuite: Tests for the fold term")

	tbl := r.DB("test").Table("tbl")
	_ = tbl // Prevent any noused variable errors

	{
		// transform/fold.yaml line #6
		/* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':100} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 100}
		/* tbl.insert(r.range(100).map(lambda i: {'id':i, 'a':i%4}).coerce_to("array")) */

		suite.T().Log("About to run line #6: tbl.Insert(r.Range(100).Map(func(i r.Term) interface{} { return map[interface{}]interface{}{'id': i, 'a': r.Mod(i, 4), }}).CoerceTo('array'))")

		runAndAssert(suite.Suite, expected_, tbl.Insert(r.Range(100).Map(func(i r.Term) interface{} { return map[interface{}]interface{}{"id": i, "a": r.Mod(i, 4)} }).CoerceTo("array")), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #6")
	}

	{
		// transform/fold.yaml line #19
		/* 10 */
		var expected_ int = 10
		/* r.range(0, 10).fold(0, lambda acc, row: acc.add(1)) */

		suite.T().Log("About to run line #19: r.Range(0, 10).Fold(0, func(acc r.Term, row r.Term) interface{} { return acc.Add(1)})")

		runAndAssert(suite.Suite, expected_, r.Range(0, 10).Fold(0, func(acc r.Term, row r.Term) interface{} { return acc.Add(1) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #19")
	}

	{
		// transform/fold.yaml line #23
		/* 20 */
		var expected_ int = 20
		/* r.range(0, 10).fold(0, lambda acc, row: acc.add(1), final_emit=lambda acc: acc.mul(2)) */

		suite.T().Log("About to run line #23: r.Range(0, 10).Fold(0, func(acc r.Term, row r.Term) interface{} { return acc.Add(1)}).OptArgs(r.FoldOpts{FinalEmit: func(acc r.Term) interface{} { return acc.Mul(2)}, })")

		runAndAssert(suite.Suite, expected_, r.Range(0, 10).Fold(0, func(acc r.Term, row r.Term) interface{} { return acc.Add(1) }).OptArgs(r.FoldOpts{FinalEmit: func(acc r.Term) interface{} { return acc.Mul(2) }}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #23")
	}

	{
		// transform/fold.yaml line #27
		/* [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] */
		var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
		/* r.range(0, 10).fold(0, lambda acc, row: acc.add(1), emit=lambda old,row,acc: [row]).coerce_to("array") */

		suite.T().Log("About to run line #27: r.Range(0, 10).Fold(0, func(acc r.Term, row r.Term) interface{} { return acc.Add(1)}).OptArgs(r.FoldOpts{Emit: func(old r.Term, row r.Term, acc r.Term) interface{} { return []interface{}{row}}, }).CoerceTo('array')")

		runAndAssert(suite.Suite, expected_, r.Range(0, 10).Fold(0, func(acc r.Term, row r.Term) interface{} { return acc.Add(1) }).OptArgs(r.FoldOpts{Emit: func(old r.Term, row r.Term, acc r.Term) interface{} { return []interface{}{row} }}).CoerceTo("array"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #27")
	}

	{
		// transform/fold.yaml line #31
		/* [2, 5, 8, 10] */
		var expected_ []interface{} = []interface{}{2, 5, 8, 10}
		/* r.range(0, 10).fold(0, lambda acc, row: acc.add(1), emit=lambda old,row,acc: r.branch(acc.mod(3).eq(0),[row],[]),final_emit=lambda acc: [acc]).coerce_to("array") */

		suite.T().Log("About to run line #31: r.Range(0, 10).Fold(0, func(acc r.Term, row r.Term) interface{} { return acc.Add(1)}).OptArgs(r.FoldOpts{Emit: func(old r.Term, row r.Term, acc r.Term) interface{} { return r.Branch(acc.Mod(3).Eq(0), []interface{}{row}, []interface{}{})}, FinalEmit: func(acc r.Term) interface{} { return []interface{}{acc}}, }).CoerceTo('array')")

		runAndAssert(suite.Suite, expected_, r.Range(0, 10).Fold(0, func(acc r.Term, row r.Term) interface{} { return acc.Add(1) }).OptArgs(r.FoldOpts{Emit: func(old r.Term, row r.Term, acc r.Term) interface{} {
			return r.Branch(acc.Mod(3).Eq(0), []interface{}{row}, []interface{}{})
		}, FinalEmit: func(acc r.Term) interface{} { return []interface{}{acc} }}).CoerceTo("array"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #31")
	}

	{
		// transform/fold.yaml line #35
		/* [1, 2, 3, 5, 8, 13, 21, 34, 55, 89] */
		var expected_ []interface{} = []interface{}{1, 2, 3, 5, 8, 13, 21, 34, 55, 89}
		/* r.range(0, 10).fold([1, 1], lambda acc, row: [acc[1], acc[0].add(acc[1])], emit=lambda old,row,acc: [acc[0]]).coerce_to("array") */

		suite.T().Log("About to run line #35: r.Range(0, 10).Fold([]interface{}{1, 1}, func(acc r.Term, row r.Term) interface{} { return []interface{}{acc.AtIndex(1), acc.AtIndex(0).Add(acc.AtIndex(1))}}).OptArgs(r.FoldOpts{Emit: func(old r.Term, row r.Term, acc r.Term) interface{} { return []interface{}{acc.AtIndex(0)}}, }).CoerceTo('array')")

		runAndAssert(suite.Suite, expected_, r.Range(0, 10).Fold([]interface{}{1, 1}, func(acc r.Term, row r.Term) interface{} {
			return []interface{}{acc.AtIndex(1), acc.AtIndex(0).Add(acc.AtIndex(1))}
		}).OptArgs(r.FoldOpts{Emit: func(old r.Term, row r.Term, acc r.Term) interface{} { return []interface{}{acc.AtIndex(0)} }}).CoerceTo("array"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #35")
	}

	{
		// transform/fold.yaml line #37
		/* "STREAM" */
		var expected_ string = "STREAM"
		/* r.range(0, 10).fold(0, lambda acc, row: acc, emit=lambda old,row,acc: acc).type_of() */

		suite.T().Log("About to run line #37: r.Range(0, 10).Fold(0, func(acc r.Term, row r.Term) interface{} { return acc}).OptArgs(r.FoldOpts{Emit: func(old r.Term, row r.Term, acc r.Term) interface{} { return acc}, }).TypeOf()")

		runAndAssert(suite.Suite, expected_, r.Range(0, 10).Fold(0, func(acc r.Term, row r.Term) interface{} { return acc }).OptArgs(r.FoldOpts{Emit: func(old r.Term, row r.Term, acc r.Term) interface{} { return acc }}).TypeOf(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #37")
	}

	{
		// transform/fold.yaml line #39
		/* [{'a': 0, 'id': 20}, {'a': 3, 'id': 15}, {'a': 2, 'id': 46}, {'a': 2, 'id': 78}, {'a': 2, 'id': 90}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"a": 0, "id": 20}, map[interface{}]interface{}{"a": 3, "id": 15}, map[interface{}]interface{}{"a": 2, "id": 46}, map[interface{}]interface{}{"a": 2, "id": 78}, map[interface{}]interface{}{"a": 2, "id": 90}}
		/* tbl.filter("id").fold(0, lambda acc, row: acc.add(1), emit=lambda old,row,acc: r.branch(old.mod(20).eq(0),[row],[])).coerce_to("array") */

		suite.T().Log("About to run line #39: tbl.Filter('id').Fold(0, func(acc r.Term, row r.Term) interface{} { return acc.Add(1)}).OptArgs(r.FoldOpts{Emit: func(old r.Term, row r.Term, acc r.Term) interface{} { return r.Branch(old.Mod(20).Eq(0), []interface{}{row}, []interface{}{})}, }).CoerceTo('array')")

		runAndAssert(suite.Suite, expected_, tbl.Filter("id").Fold(0, func(acc r.Term, row r.Term) interface{} { return acc.Add(1) }).OptArgs(r.FoldOpts{Emit: func(old r.Term, row r.Term, acc r.Term) interface{} {
			return r.Branch(old.Mod(20).Eq(0), []interface{}{row}, []interface{}{})
		}}).CoerceTo("array"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #39")
	}

	{
		// transform/fold.yaml line #42
		/* [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] */
		var expected_ []interface{} = []interface{}{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
		/* r.range().fold(0, lambda acc, row: acc.add(1), emit=lambda old,row,acc: [acc]).limit(10) */

		suite.T().Log("About to run line #42: r.Range().Fold(0, func(acc r.Term, row r.Term) interface{} { return acc.Add(1)}).OptArgs(r.FoldOpts{Emit: func(old r.Term, row r.Term, acc r.Term) interface{} { return []interface{}{acc}}, }).Limit(10)")

		runAndAssert(suite.Suite, expected_, r.Range().Fold(0, func(acc r.Term, row r.Term) interface{} { return acc.Add(1) }).OptArgs(r.FoldOpts{Emit: func(old r.Term, row r.Term, acc r.Term) interface{} { return []interface{}{acc} }}).Limit(10), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #42")
	}

	{
		// transform/fold.yaml line #45
		/* err("ReqlQueryLogicError", "Cannot use an infinite stream with an aggregation function (`reduce`, `count`, etc.) or coerce it to an array.") */
		var expected_ Err = err("ReqlQueryLogicError", "Cannot use an infinite stream with an aggregation function (`reduce`, `count`, etc.) or coerce it to an array.")
		/* r.range().fold(0, lambda acc, row: acc.add(1), emit=lambda old,row,acc: [acc]).map(lambda doc: 1).reduce(lambda l, r: l+r) */

		suite.T().Log("About to run line #45: r.Range().Fold(0, func(acc r.Term, row r.Term) interface{} { return acc.Add(1)}).OptArgs(r.FoldOpts{Emit: func(old r.Term, row r.Term, acc r.Term) interface{} { return []interface{}{acc}}, }).Map(func(doc r.Term) interface{} { return 1}).Reduce(func(l r.Term, r r.Term) interface{} { return r.Add(l, r)})")

		runAndAssert(suite.Suite, expected_, r.Range().Fold(0, func(acc r.Term, row r.Term) interface{} { return acc.Add(1) }).OptArgs(r.FoldOpts{Emit: func(old r.Term, row r.Term, acc r.Term) interface{} { return []interface{}{acc} }}).Map(func(doc r.Term) interface{} { return 1 }).Reduce(func(l r.Term, r r.Term) interface{} { return r.Add(l, r) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #45")
	}

	{
		// transform/fold.yaml line #48
		/* [x for x in range(1, 1001)] */
		var expected_ []interface{} = (func() []interface{} {
			res := []interface{}{}
			for iterator_ := 1; iterator_ < 1001; iterator_++ {
				x := iterator_
				res = append(res, x)
			}
			return res
		}())
		/* r.range(0, 1000).fold(0, lambda acc, row: acc.add(1), emit=lambda old,row,acc: [acc]).coerce_to("array") */

		suite.T().Log("About to run line #48: r.Range(0, 1000).Fold(0, func(acc r.Term, row r.Term) interface{} { return acc.Add(1)}).OptArgs(r.FoldOpts{Emit: func(old r.Term, row r.Term, acc r.Term) interface{} { return []interface{}{acc}}, }).CoerceTo('array')")

		runAndAssert(suite.Suite, expected_, r.Range(0, 1000).Fold(0, func(acc r.Term, row r.Term) interface{} { return acc.Add(1) }).OptArgs(r.FoldOpts{Emit: func(old r.Term, row r.Term, acc r.Term) interface{} { return []interface{}{acc} }}).CoerceTo("array"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #48")
	}
}
コード例 #5
0
ファイル: reql_default_test.go プロジェクト: freedmand/doc.vu
func (suite *DefaultSuite) TestCases() {
	suite.T().Log("Running DefaultSuite: Tests r.default")

	{
		// default.yaml line #3
		/* 1 */
		var expected_ int = 1
		/* r.expr(1).default(2) */

		suite.T().Log("About to run line #3: r.Expr(1).Default(2)")

		runAndAssert(suite.Suite, expected_, r.Expr(1).Default(2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #3")
	}

	{
		// default.yaml line #5
		/* 2 */
		var expected_ int = 2
		/* r.expr(null).default(2) */

		suite.T().Log("About to run line #5: r.Expr(nil).Default(2)")

		runAndAssert(suite.Suite, expected_, r.Expr(nil).Default(2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #5")
	}

	{
		// default.yaml line #7
		/* 2 */
		var expected_ int = 2
		/* r.expr({})['b'].default(2) */

		suite.T().Log("About to run line #7: r.Expr(map[interface{}]interface{}{}).AtIndex('b').Default(2)")

		runAndAssert(suite.Suite, expected_, r.Expr(map[interface{}]interface{}{}).AtIndex("b").Default(2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #7")
	}

	{
		// default.yaml line #10
		/* err("ReqlQueryLogicError", "Cannot perform bracket on a non-object non-sequence `\"a\"`.", []) */
		var expected_ Err = err("ReqlQueryLogicError", "Cannot perform bracket on a non-object non-sequence `\"a\"`.")
		/* r.expr(r.expr('a')['b']).default(2) */

		suite.T().Log("About to run line #10: r.Expr(r.Expr('a').AtIndex('b')).Default(2)")

		runAndAssert(suite.Suite, expected_, r.Expr(r.Expr("a").AtIndex("b")).Default(2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #10")
	}

	{
		// default.yaml line #14
		/* 2 */
		var expected_ int = 2
		/* r.expr([]).reduce(lambda a,b:a+b).default(2) */

		suite.T().Log("About to run line #14: r.Expr([]interface{}{}).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)}).Default(2)")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{}).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }).Default(2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #14")
	}

	{
		// default.yaml line #18
		/* 2 */
		var expected_ int = 2
		/* r.expr([]).union([]).reduce(lambda a,b:a+b).default(2) */

		suite.T().Log("About to run line #18: r.Expr([]interface{}{}).Union([]interface{}{}).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)}).Default(2)")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{}).Union([]interface{}{}).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }).Default(2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #18")
	}

	{
		// default.yaml line #22
		/* err("ReqlQueryLogicError", "Cannot convert STRING to SEQUENCE", []) */
		var expected_ Err = err("ReqlQueryLogicError", "Cannot convert STRING to SEQUENCE")
		/* r.expr('a').reduce(lambda a,b:a+b).default(2) */

		suite.T().Log("About to run line #22: r.Expr('a').Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)}).Default(2)")

		runAndAssert(suite.Suite, expected_, r.Expr("a").Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }).Default(2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #22")
	}

	{
		// default.yaml line #25
		/* 2 */
		var expected_ int = 2
		/* (r.expr(null) + 5).default(2) */

		suite.T().Log("About to run line #25: r.Expr(nil).Add(5).Default(2)")

		runAndAssert(suite.Suite, expected_, r.Expr(nil).Add(5).Default(2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #25")
	}

	{
		// default.yaml line #28
		/* 2 */
		var expected_ int = 2
		/* (5 + r.expr(null)).default(2) */

		suite.T().Log("About to run line #28: r.Add(5, r.Expr(nil)).Default(2)")

		runAndAssert(suite.Suite, expected_, r.Add(5, r.Expr(nil)).Default(2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #28")
	}

	{
		// default.yaml line #31
		/* 2 */
		var expected_ int = 2
		/* (5 - r.expr(null)).default(2) */

		suite.T().Log("About to run line #31: r.Sub(5, r.Expr(nil)).Default(2)")

		runAndAssert(suite.Suite, expected_, r.Sub(5, r.Expr(nil)).Default(2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #31")
	}

	{
		// default.yaml line #34
		/* 2 */
		var expected_ int = 2
		/* (r.expr(null) - 5).default(2) */

		suite.T().Log("About to run line #34: r.Expr(nil).Sub(5).Default(2)")

		runAndAssert(suite.Suite, expected_, r.Expr(nil).Sub(5).Default(2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #34")
	}

	{
		// default.yaml line #37
		/* err("ReqlQueryLogicError", "Expected type STRING but found NUMBER.", []) */
		var expected_ Err = err("ReqlQueryLogicError", "Expected type STRING but found NUMBER.")
		/* (r.expr('a') + 5).default(2) */

		suite.T().Log("About to run line #37: r.Expr('a').Add(5).Default(2)")

		runAndAssert(suite.Suite, expected_, r.Expr("a").Add(5).Default(2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #37")
	}

	{
		// default.yaml line #40
		/* err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", []) */
		var expected_ Err = err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.")
		/* (5 + r.expr('a')).default(2) */

		suite.T().Log("About to run line #40: r.Add(5, r.Expr('a')).Default(2)")

		runAndAssert(suite.Suite, expected_, r.Add(5, r.Expr("a")).Default(2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #40")
	}

	{
		// default.yaml line #43
		/* err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", []) */
		var expected_ Err = err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.")
		/* (r.expr('a') - 5).default(2) */

		suite.T().Log("About to run line #43: r.Expr('a').Sub(5).Default(2)")

		runAndAssert(suite.Suite, expected_, r.Expr("a").Sub(5).Default(2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #43")
	}

	{
		// default.yaml line #46
		/* err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", []) */
		var expected_ Err = err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.")
		/* (5 - r.expr('a')).default(2) */

		suite.T().Log("About to run line #46: r.Sub(5, r.Expr('a')).Default(2)")

		runAndAssert(suite.Suite, expected_, r.Sub(5, r.Expr("a")).Default(2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #46")
	}

	{
		// default.yaml line #50
		/* 1 */
		var expected_ int = 1
		/* r.expr(1).default(r.error()) */

		suite.T().Log("About to run line #50: r.Expr(1).Default(r.Error())")

		runAndAssert(suite.Suite, expected_, r.Expr(1).Default(r.Error()), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #50")
	}

	{
		// default.yaml line #52
		/* (null) */
		var expected_ interface{} = nil
		/* r.expr(null).default(r.error()) */

		suite.T().Log("About to run line #52: r.Expr(nil).Default(r.Error())")

		runAndAssert(suite.Suite, expected_, r.Expr(nil).Default(r.Error()), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #52")
	}

	{
		// default.yaml line #54
		/* err("ReqlNonExistenceError", "No attribute `b` in object:", []) */
		var expected_ Err = err("ReqlNonExistenceError", "No attribute `b` in object:")
		/* r.expr({})['b'].default(r.error()) */

		suite.T().Log("About to run line #54: r.Expr(map[interface{}]interface{}{}).AtIndex('b').Default(r.Error())")

		runAndAssert(suite.Suite, expected_, r.Expr(map[interface{}]interface{}{}).AtIndex("b").Default(r.Error()), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #54")
	}

	{
		// default.yaml line #58
		/* err("ReqlNonExistenceError", "Cannot reduce over an empty stream.", []) */
		var expected_ Err = err("ReqlNonExistenceError", "Cannot reduce over an empty stream.")
		/* r.expr([]).reduce(lambda a,b:a+b).default(r.error) */

		suite.T().Log("About to run line #58: r.Expr([]interface{}{}).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)}).Default(r.Error())")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{}).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }).Default(r.Error()), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #58")
	}

	{
		// default.yaml line #62
		/* err("ReqlNonExistenceError", "Cannot reduce over an empty stream.", []) */
		var expected_ Err = err("ReqlNonExistenceError", "Cannot reduce over an empty stream.")
		/* r.expr([]).union([]).reduce(lambda a,b:a+b).default(r.error) */

		suite.T().Log("About to run line #62: r.Expr([]interface{}{}).Union([]interface{}{}).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)}).Default(r.Error())")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{}).Union([]interface{}{}).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }).Default(r.Error()), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #62")
	}

	{
		// default.yaml line #65
		/* err("ReqlNonExistenceError", "Expected type NUMBER but found NULL.", []) */
		var expected_ Err = err("ReqlNonExistenceError", "Expected type NUMBER but found NULL.")
		/* (r.expr(null) + 5).default(r.error) */

		suite.T().Log("About to run line #65: r.Expr(nil).Add(5).Default(r.Error())")

		runAndAssert(suite.Suite, expected_, r.Expr(nil).Add(5).Default(r.Error()), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #65")
	}

	{
		// default.yaml line #68
		/* err("ReqlNonExistenceError", "Expected type NUMBER but found NULL.", []) */
		var expected_ Err = err("ReqlNonExistenceError", "Expected type NUMBER but found NULL.")
		/* (5 + r.expr(null)).default(r.error) */

		suite.T().Log("About to run line #68: r.Add(5, r.Expr(nil)).Default(r.Error())")

		runAndAssert(suite.Suite, expected_, r.Add(5, r.Expr(nil)).Default(r.Error()), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #68")
	}

	{
		// default.yaml line #71
		/* err("ReqlNonExistenceError", "Expected type NUMBER but found NULL.", []) */
		var expected_ Err = err("ReqlNonExistenceError", "Expected type NUMBER but found NULL.")
		/* (5 - r.expr(null)).default(r.error) */

		suite.T().Log("About to run line #71: r.Sub(5, r.Expr(nil)).Default(r.Error())")

		runAndAssert(suite.Suite, expected_, r.Sub(5, r.Expr(nil)).Default(r.Error()), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #71")
	}

	{
		// default.yaml line #74
		/* err("ReqlNonExistenceError", "Expected type NUMBER but found NULL.", []) */
		var expected_ Err = err("ReqlNonExistenceError", "Expected type NUMBER but found NULL.")
		/* (r.expr(null) - 5).default(r.error) */

		suite.T().Log("About to run line #74: r.Expr(nil).Sub(5).Default(r.Error())")

		runAndAssert(suite.Suite, expected_, r.Expr(nil).Sub(5).Default(r.Error()), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #74")
	}

	{
		// default.yaml line #79
		/* 1 */
		var expected_ int = 1
		/* r.expr(1).default(lambda e:e) */

		suite.T().Log("About to run line #79: r.Expr(1).Default(func(e r.Term) interface{} { return e})")

		runAndAssert(suite.Suite, expected_, r.Expr(1).Default(func(e r.Term) interface{} { return e }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #79")
	}

	{
		// default.yaml line #83
		/* (null) */
		var expected_ interface{} = nil
		/* r.expr(null).default(lambda e:e) */

		suite.T().Log("About to run line #83: r.Expr(nil).Default(func(e r.Term) interface{} { return e})")

		runAndAssert(suite.Suite, expected_, r.Expr(nil).Default(func(e r.Term) interface{} { return e }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #83")
	}

	{
		// default.yaml line #87
		/* "No attribute `b` in object:\n{}" */
		var expected_ string = "No attribute `b` in object:\n{}"
		/* r.expr({})['b'].default(lambda e:e) */

		suite.T().Log("About to run line #87: r.Expr(map[interface{}]interface{}{}).AtIndex('b').Default(func(e r.Term) interface{} { return e})")

		runAndAssert(suite.Suite, expected_, r.Expr(map[interface{}]interface{}{}).AtIndex("b").Default(func(e r.Term) interface{} { return e }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #87")
	}

	{
		// default.yaml line #91
		/* ("Cannot reduce over an empty stream.") */
		var expected_ string = "Cannot reduce over an empty stream."
		/* r.expr([]).reduce(lambda a,b:a+b).default(lambda e:e) */

		suite.T().Log("About to run line #91: r.Expr([]interface{}{}).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)}).Default(func(e r.Term) interface{} { return e})")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{}).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }).Default(func(e r.Term) interface{} { return e }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #91")
	}

	{
		// default.yaml line #95
		/* ("Cannot reduce over an empty stream.") */
		var expected_ string = "Cannot reduce over an empty stream."
		/* r.expr([]).union([]).reduce(lambda a,b:a+b).default(lambda e:e) */

		suite.T().Log("About to run line #95: r.Expr([]interface{}{}).Union([]interface{}{}).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)}).Default(func(e r.Term) interface{} { return e})")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{}).Union([]interface{}{}).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }).Default(func(e r.Term) interface{} { return e }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #95")
	}

	{
		// default.yaml line #99
		/* ("Expected type NUMBER but found NULL.") */
		var expected_ string = "Expected type NUMBER but found NULL."
		/* (r.expr(null) + 5).default(lambda e:e) */

		suite.T().Log("About to run line #99: r.Expr(nil).Add(5).Default(func(e r.Term) interface{} { return e})")

		runAndAssert(suite.Suite, expected_, r.Expr(nil).Add(5).Default(func(e r.Term) interface{} { return e }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #99")
	}

	{
		// default.yaml line #103
		/* ("Expected type NUMBER but found NULL.") */
		var expected_ string = "Expected type NUMBER but found NULL."
		/* (5 + r.expr(null)).default(lambda e:e) */

		suite.T().Log("About to run line #103: r.Add(5, r.Expr(nil)).Default(func(e r.Term) interface{} { return e})")

		runAndAssert(suite.Suite, expected_, r.Add(5, r.Expr(nil)).Default(func(e r.Term) interface{} { return e }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #103")
	}

	{
		// default.yaml line #107
		/* ("Expected type NUMBER but found NULL.") */
		var expected_ string = "Expected type NUMBER but found NULL."
		/* (5 - r.expr(null)).default(lambda e:e) */

		suite.T().Log("About to run line #107: r.Sub(5, r.Expr(nil)).Default(func(e r.Term) interface{} { return e})")

		runAndAssert(suite.Suite, expected_, r.Sub(5, r.Expr(nil)).Default(func(e r.Term) interface{} { return e }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #107")
	}

	{
		// default.yaml line #111
		/* ("Expected type NUMBER but found NULL.") */
		var expected_ string = "Expected type NUMBER but found NULL."
		/* (r.expr(null) - 5).default(lambda e:e) */

		suite.T().Log("About to run line #111: r.Expr(nil).Sub(5).Default(func(e r.Term) interface{} { return e})")

		runAndAssert(suite.Suite, expected_, r.Expr(nil).Sub(5).Default(func(e r.Term) interface{} { return e }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #111")
	}

	// default.yaml line #115
	// arr = r.expr([{'a':1},{'a':null},{}]).order_by('a')
	suite.T().Log("Possibly executing: var arr r.Term = r.Expr([]interface{}{map[interface{}]interface{}{'a': 1, }, map[interface{}]interface{}{'a': nil, }, map[interface{}]interface{}{}}).OrderBy('a')")

	arr := r.Expr([]interface{}{map[interface{}]interface{}{"a": 1}, map[interface{}]interface{}{"a": nil}, map[interface{}]interface{}{}}).OrderBy("a")
	_ = arr // Prevent any noused variable errors

	{
		// default.yaml line #118
		/* [{'a':1}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"a": 1}}
		/* arr.filter(lambda x:x['a'].eq(1)) */

		suite.T().Log("About to run line #118: arr.Filter(func(x r.Term) interface{} { return x.AtIndex('a').Eq(1)})")

		runAndAssert(suite.Suite, expected_, arr.Filter(func(x r.Term) interface{} { return x.AtIndex("a").Eq(1) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #118")
	}

	{
		// default.yaml line #122
		/* [{'a':1}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"a": 1}}
		/* arr.filter(lambda x:x['a'].eq(1), default=False) */

		suite.T().Log("About to run line #122: arr.Filter(func(x r.Term) interface{} { return x.AtIndex('a').Eq(1)}).OptArgs(r.FilterOpts{Default: false, })")

		runAndAssert(suite.Suite, expected_, arr.Filter(func(x r.Term) interface{} { return x.AtIndex("a").Eq(1) }).OptArgs(r.FilterOpts{Default: false}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #122")
	}

	{
		// default.yaml line #126
		/* [{}, {'a':1}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{}, map[interface{}]interface{}{"a": 1}}
		/* arr.filter(lambda x:x['a'].eq(1), default=True) */

		suite.T().Log("About to run line #126: arr.Filter(func(x r.Term) interface{} { return x.AtIndex('a').Eq(1)}).OptArgs(r.FilterOpts{Default: true, })")

		runAndAssert(suite.Suite, expected_, arr.Filter(func(x r.Term) interface{} { return x.AtIndex("a").Eq(1) }).OptArgs(r.FilterOpts{Default: true}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #126")
	}

	{
		// default.yaml line #131
		/* [{}, {'a':1}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{}, map[interface{}]interface{}{"a": 1}}
		/* arr.filter(lambda x:x['a'].eq(1), default=r.js('true')) */

		suite.T().Log("About to run line #131: arr.Filter(func(x r.Term) interface{} { return x.AtIndex('a').Eq(1)}).OptArgs(r.FilterOpts{Default: r.JS('true'), })")

		runAndAssert(suite.Suite, expected_, arr.Filter(func(x r.Term) interface{} { return x.AtIndex("a").Eq(1) }).OptArgs(r.FilterOpts{Default: r.JS("true")}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #131")
	}

	{
		// default.yaml line #135
		/* [{'a':1}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"a": 1}}
		/* arr.filter(lambda x:x['a'].eq(1), default=r.js('false')) */

		suite.T().Log("About to run line #135: arr.Filter(func(x r.Term) interface{} { return x.AtIndex('a').Eq(1)}).OptArgs(r.FilterOpts{Default: r.JS('false'), })")

		runAndAssert(suite.Suite, expected_, arr.Filter(func(x r.Term) interface{} { return x.AtIndex("a").Eq(1) }).OptArgs(r.FilterOpts{Default: r.JS("false")}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #135")
	}

	{
		// default.yaml line #139
		/* err("ReqlNonExistenceError", "No attribute `a` in object:", []) */
		var expected_ Err = err("ReqlNonExistenceError", "No attribute `a` in object:")
		/* arr.filter(lambda x:x['a'].eq(1), default=r.error()) */

		suite.T().Log("About to run line #139: arr.Filter(func(x r.Term) interface{} { return x.AtIndex('a').Eq(1)}).OptArgs(r.FilterOpts{Default: r.Error(), })")

		runAndAssert(suite.Suite, expected_, arr.Filter(func(x r.Term) interface{} { return x.AtIndex("a").Eq(1) }).OptArgs(r.FilterOpts{Default: r.Error()}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #139")
	}

	{
		// default.yaml line #144
		/* [{'a':1}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"a": 1}}
		/* r.expr(False).do(lambda d:arr.filter(lambda x:x['a'].eq(1), default=d)) */

		suite.T().Log("About to run line #144: r.Expr(false).Do(func(d r.Term) interface{} { return arr.Filter(func(x r.Term) interface{} { return x.AtIndex('a').Eq(1)}).OptArgs(r.FilterOpts{Default: d, })})")

		runAndAssert(suite.Suite, expected_, r.Expr(false).Do(func(d r.Term) interface{} {
			return arr.Filter(func(x r.Term) interface{} { return x.AtIndex("a").Eq(1) }).OptArgs(r.FilterOpts{Default: d})
		}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #144")
	}

	{
		// default.yaml line #148
		/* [{}, {'a':1}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{}, map[interface{}]interface{}{"a": 1}}
		/* r.expr(True).do(lambda d:arr.filter(lambda x:x['a'].eq(1), default=d)).order_by('a') */

		suite.T().Log("About to run line #148: r.Expr(true).Do(func(d r.Term) interface{} { return arr.Filter(func(x r.Term) interface{} { return x.AtIndex('a').Eq(1)}).OptArgs(r.FilterOpts{Default: d, })}).OrderBy('a')")

		runAndAssert(suite.Suite, expected_, r.Expr(true).Do(func(d r.Term) interface{} {
			return arr.Filter(func(x r.Term) interface{} { return x.AtIndex("a").Eq(1) }).OptArgs(r.FilterOpts{Default: d})
		}).OrderBy("a"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #148")
	}

	{
		// default.yaml line #154
		/* [{'a':1}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"a": 1}}
		/* arr.filter(lambda x:x['a'].default(0).eq(1)) */

		suite.T().Log("About to run line #154: arr.Filter(func(x r.Term) interface{} { return x.AtIndex('a').Default(0).Eq(1)})")

		runAndAssert(suite.Suite, expected_, arr.Filter(func(x r.Term) interface{} { return x.AtIndex("a").Default(0).Eq(1) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #154")
	}

	{
		// default.yaml line #158
		/* ([{}, {'a':null}, {'a':1}]) */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{}, map[interface{}]interface{}{"a": nil}, map[interface{}]interface{}{"a": 1}}
		/* arr.filter(lambda x:x['a'].default(1).eq(1)).order_by('a') */

		suite.T().Log("About to run line #158: arr.Filter(func(x r.Term) interface{} { return x.AtIndex('a').Default(1).Eq(1)}).OrderBy('a')")

		runAndAssert(suite.Suite, expected_, arr.Filter(func(x r.Term) interface{} { return x.AtIndex("a").Default(1).Eq(1) }).OrderBy("a"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #158")
	}

	{
		// default.yaml line #162
		/* [{'a':1}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"a": 1}}
		/* arr.filter(lambda x:x['a'].default(r.error()).eq(1)) */

		suite.T().Log("About to run line #162: arr.Filter(func(x r.Term) interface{} { return x.AtIndex('a').Default(r.Error()).Eq(1)})")

		runAndAssert(suite.Suite, expected_, arr.Filter(func(x r.Term) interface{} { return x.AtIndex("a").Default(r.Error()).Eq(1) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #162")
	}

	{
		// default.yaml line #168
		/* [{'a':1}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"a": 1}}
		/* r.expr(0).do(lambda i:arr.filter(lambda x:x['a'].default(i).eq(1))) */

		suite.T().Log("About to run line #168: r.Expr(0).Do(func(i r.Term) interface{} { return arr.Filter(func(x r.Term) interface{} { return x.AtIndex('a').Default(i).Eq(1)})})")

		runAndAssert(suite.Suite, expected_, r.Expr(0).Do(func(i r.Term) interface{} {
			return arr.Filter(func(x r.Term) interface{} { return x.AtIndex("a").Default(i).Eq(1) })
		}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #168")
	}

	{
		// default.yaml line #172
		/* ([{},{'a':null},{'a':1}]) */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{}, map[interface{}]interface{}{"a": nil}, map[interface{}]interface{}{"a": 1}}
		/* r.expr(1).do(lambda i:arr.filter(lambda x:x['a'].default(i).eq(1))).order_by('a') */

		suite.T().Log("About to run line #172: r.Expr(1).Do(func(i r.Term) interface{} { return arr.Filter(func(x r.Term) interface{} { return x.AtIndex('a').Default(i).Eq(1)})}).OrderBy('a')")

		runAndAssert(suite.Suite, expected_, r.Expr(1).Do(func(i r.Term) interface{} {
			return arr.Filter(func(x r.Term) interface{} { return x.AtIndex("a").Default(i).Eq(1) })
		}).OrderBy("a"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #172")
	}

	{
		// default.yaml line #177
		/* [{'a':1}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"a": 1}}
		/* arr.filter(lambda x:r.or_(x['a'].eq(1), x['a']['b'].eq(2))) */

		suite.T().Log("About to run line #177: arr.Filter(func(x r.Term) interface{} { return r.Or(x.AtIndex('a').Eq(1), x.AtIndex('a').AtIndex('b').Eq(2))})")

		runAndAssert(suite.Suite, expected_, arr.Filter(func(x r.Term) interface{} { return r.Or(x.AtIndex("a").Eq(1), x.AtIndex("a").AtIndex("b").Eq(2)) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #177")
	}

	{
		// default.yaml line #181
		/* [{'a':1}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"a": 1}}
		/* arr.filter(lambda x:r.or_(x['a'].eq(1), x['a']['b'].eq(2)), default=False) */

		suite.T().Log("About to run line #181: arr.Filter(func(x r.Term) interface{} { return r.Or(x.AtIndex('a').Eq(1), x.AtIndex('a').AtIndex('b').Eq(2))}).OptArgs(r.FilterOpts{Default: false, })")

		runAndAssert(suite.Suite, expected_, arr.Filter(func(x r.Term) interface{} { return r.Or(x.AtIndex("a").Eq(1), x.AtIndex("a").AtIndex("b").Eq(2)) }).OptArgs(r.FilterOpts{Default: false}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #181")
	}

	{
		// default.yaml line #185
		/* ([{}, {'a':null}, {'a':1}]) */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{}, map[interface{}]interface{}{"a": nil}, map[interface{}]interface{}{"a": 1}}
		/* arr.filter(lambda x:r.or_(x['a'].eq(1), x['a']['b'].eq(2)), default=True).order_by('a') */

		suite.T().Log("About to run line #185: arr.Filter(func(x r.Term) interface{} { return r.Or(x.AtIndex('a').Eq(1), x.AtIndex('a').AtIndex('b').Eq(2))}).OptArgs(r.FilterOpts{Default: true, }).OrderBy('a')")

		runAndAssert(suite.Suite, expected_, arr.Filter(func(x r.Term) interface{} { return r.Or(x.AtIndex("a").Eq(1), x.AtIndex("a").AtIndex("b").Eq(2)) }).OptArgs(r.FilterOpts{Default: true}).OrderBy("a"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #185")
	}

	{
		// default.yaml line #189
		/* err("ReqlNonExistenceError", "No attribute `a` in object:", []) */
		var expected_ Err = err("ReqlNonExistenceError", "No attribute `a` in object:")
		/* arr.filter(lambda x:r.or_(x['a'].eq(1), x['a']['b'].eq(2)), default=r.error()) */

		suite.T().Log("About to run line #189: arr.Filter(func(x r.Term) interface{} { return r.Or(x.AtIndex('a').Eq(1), x.AtIndex('a').AtIndex('b').Eq(2))}).OptArgs(r.FilterOpts{Default: r.Error(), })")

		runAndAssert(suite.Suite, expected_, arr.Filter(func(x r.Term) interface{} { return r.Or(x.AtIndex("a").Eq(1), x.AtIndex("a").AtIndex("b").Eq(2)) }).OptArgs(r.FilterOpts{Default: r.Error()}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #189")
	}

	{
		// default.yaml line #193
		/* partial({'tables_created':1}) */
		var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"tables_created": 1})
		/* r.table_create('default_test') */

		suite.T().Log("About to run line #193: r.TableCreate('default_test')")

		runAndAssert(suite.Suite, expected_, r.TableCreate("default_test"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #193")
	}

	{
		// default.yaml line #196
		/* ({'deleted':0,'replaced':0,'generated_keys':arrlen(3,uuid()),'unchanged':0,'errors':0,'skipped':0,'inserted':3}) */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "generated_keys": arrlen(3, compare.IsUUID()), "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 3}
		/* r.table('default_test').insert(arr) */

		suite.T().Log("About to run line #196: r.Table('default_test').Insert(arr)")

		runAndAssert(suite.Suite, expected_, r.Table("default_test").Insert(arr), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #196")
	}

	// default.yaml line #199
	// tbl = r.table('default_test').order_by('a').pluck('a')
	suite.T().Log("Possibly executing: var tbl r.Term = r.Table('default_test').OrderBy('a').Pluck('a')")

	tbl := r.Table("default_test").OrderBy("a").Pluck("a")
	_ = tbl // Prevent any noused variable errors

	{
		// default.yaml line #202
		/* [{'a':1}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"a": 1}}
		/* tbl.filter(lambda x:x['a'].eq(1)) */

		suite.T().Log("About to run line #202: tbl.Filter(func(x r.Term) interface{} { return x.AtIndex('a').Eq(1)})")

		runAndAssert(suite.Suite, expected_, tbl.Filter(func(x r.Term) interface{} { return x.AtIndex("a").Eq(1) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #202")
	}

	{
		// default.yaml line #206
		/* [{'a':1}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"a": 1}}
		/* tbl.filter(lambda x:x['a'].eq(1), default=False) */

		suite.T().Log("About to run line #206: tbl.Filter(func(x r.Term) interface{} { return x.AtIndex('a').Eq(1)}).OptArgs(r.FilterOpts{Default: false, })")

		runAndAssert(suite.Suite, expected_, tbl.Filter(func(x r.Term) interface{} { return x.AtIndex("a").Eq(1) }).OptArgs(r.FilterOpts{Default: false}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #206")
	}

	{
		// default.yaml line #210
		/* [{}, {'a':1}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{}, map[interface{}]interface{}{"a": 1}}
		/* tbl.filter(lambda x:x['a'].eq(1), default=True) */

		suite.T().Log("About to run line #210: tbl.Filter(func(x r.Term) interface{} { return x.AtIndex('a').Eq(1)}).OptArgs(r.FilterOpts{Default: true, })")

		runAndAssert(suite.Suite, expected_, tbl.Filter(func(x r.Term) interface{} { return x.AtIndex("a").Eq(1) }).OptArgs(r.FilterOpts{Default: true}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #210")
	}

	{
		// default.yaml line #215
		/* err("ReqlNonExistenceError", "No attribute `a` in object:", []) */
		var expected_ Err = err("ReqlNonExistenceError", "No attribute `a` in object:")
		/* tbl.filter(lambda x:x['a'].eq(1), default=r.error()) */

		suite.T().Log("About to run line #215: tbl.Filter(func(x r.Term) interface{} { return x.AtIndex('a').Eq(1)}).OptArgs(r.FilterOpts{Default: r.Error(), })")

		runAndAssert(suite.Suite, expected_, tbl.Filter(func(x r.Term) interface{} { return x.AtIndex("a").Eq(1) }).OptArgs(r.FilterOpts{Default: r.Error()}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #215")
	}

	{
		// default.yaml line #220
		/* [{'a':1}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"a": 1}}
		/* r.expr(False).do(lambda d:tbl.filter(lambda x:x['a'].eq(1), default=d)) */

		suite.T().Log("About to run line #220: r.Expr(false).Do(func(d r.Term) interface{} { return tbl.Filter(func(x r.Term) interface{} { return x.AtIndex('a').Eq(1)}).OptArgs(r.FilterOpts{Default: d, })})")

		runAndAssert(suite.Suite, expected_, r.Expr(false).Do(func(d r.Term) interface{} {
			return tbl.Filter(func(x r.Term) interface{} { return x.AtIndex("a").Eq(1) }).OptArgs(r.FilterOpts{Default: d})
		}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #220")
	}

	{
		// default.yaml line #224
		/* [{}, {'a':1}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{}, map[interface{}]interface{}{"a": 1}}
		/* r.expr(True).do(lambda d:tbl.filter(lambda x:x['a'].eq(1), default=d)).order_by('a') */

		suite.T().Log("About to run line #224: r.Expr(true).Do(func(d r.Term) interface{} { return tbl.Filter(func(x r.Term) interface{} { return x.AtIndex('a').Eq(1)}).OptArgs(r.FilterOpts{Default: d, })}).OrderBy('a')")

		runAndAssert(suite.Suite, expected_, r.Expr(true).Do(func(d r.Term) interface{} {
			return tbl.Filter(func(x r.Term) interface{} { return x.AtIndex("a").Eq(1) }).OptArgs(r.FilterOpts{Default: d})
		}).OrderBy("a"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #224")
	}

	{
		// default.yaml line #230
		/* [{'a':1}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"a": 1}}
		/* tbl.filter(lambda x:x['a'].default(0).eq(1)) */

		suite.T().Log("About to run line #230: tbl.Filter(func(x r.Term) interface{} { return x.AtIndex('a').Default(0).Eq(1)})")

		runAndAssert(suite.Suite, expected_, tbl.Filter(func(x r.Term) interface{} { return x.AtIndex("a").Default(0).Eq(1) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #230")
	}

	{
		// default.yaml line #234
		/* ([{}, {'a':null}, {'a':1}]) */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{}, map[interface{}]interface{}{"a": nil}, map[interface{}]interface{}{"a": 1}}
		/* tbl.filter(lambda x:x['a'].default(1).eq(1)).order_by('a') */

		suite.T().Log("About to run line #234: tbl.Filter(func(x r.Term) interface{} { return x.AtIndex('a').Default(1).Eq(1)}).OrderBy('a')")

		runAndAssert(suite.Suite, expected_, tbl.Filter(func(x r.Term) interface{} { return x.AtIndex("a").Default(1).Eq(1) }).OrderBy("a"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #234")
	}

	{
		// default.yaml line #238
		/* [{'a':1}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"a": 1}}
		/* tbl.filter(lambda x:x['a'].default(r.error()).eq(1)) */

		suite.T().Log("About to run line #238: tbl.Filter(func(x r.Term) interface{} { return x.AtIndex('a').Default(r.Error()).Eq(1)})")

		runAndAssert(suite.Suite, expected_, tbl.Filter(func(x r.Term) interface{} { return x.AtIndex("a").Default(r.Error()).Eq(1) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #238")
	}

	{
		// default.yaml line #244
		/* [{'a':1}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"a": 1}}
		/* r.expr(0).do(lambda i:tbl.filter(lambda x:x['a'].default(i).eq(1))) */

		suite.T().Log("About to run line #244: r.Expr(0).Do(func(i r.Term) interface{} { return tbl.Filter(func(x r.Term) interface{} { return x.AtIndex('a').Default(i).Eq(1)})})")

		runAndAssert(suite.Suite, expected_, r.Expr(0).Do(func(i r.Term) interface{} {
			return tbl.Filter(func(x r.Term) interface{} { return x.AtIndex("a").Default(i).Eq(1) })
		}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #244")
	}

	{
		// default.yaml line #248
		/* ([{},{'a':null},{'a':1}]) */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{}, map[interface{}]interface{}{"a": nil}, map[interface{}]interface{}{"a": 1}}
		/* r.expr(1).do(lambda i:tbl.filter(lambda x:x['a'].default(i).eq(1))).order_by('a') */

		suite.T().Log("About to run line #248: r.Expr(1).Do(func(i r.Term) interface{} { return tbl.Filter(func(x r.Term) interface{} { return x.AtIndex('a').Default(i).Eq(1)})}).OrderBy('a')")

		runAndAssert(suite.Suite, expected_, r.Expr(1).Do(func(i r.Term) interface{} {
			return tbl.Filter(func(x r.Term) interface{} { return x.AtIndex("a").Default(i).Eq(1) })
		}).OrderBy("a"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #248")
	}

	{
		// default.yaml line #253
		/* [{'a':1}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"a": 1}}
		/* tbl.filter(lambda x:r.or_(x['a'].eq(1), x['a']['b'].eq(2))) */

		suite.T().Log("About to run line #253: tbl.Filter(func(x r.Term) interface{} { return r.Or(x.AtIndex('a').Eq(1), x.AtIndex('a').AtIndex('b').Eq(2))})")

		runAndAssert(suite.Suite, expected_, tbl.Filter(func(x r.Term) interface{} { return r.Or(x.AtIndex("a").Eq(1), x.AtIndex("a").AtIndex("b").Eq(2)) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #253")
	}

	{
		// default.yaml line #257
		/* [{'a':1}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"a": 1}}
		/* tbl.filter(lambda x:r.or_(x['a'].eq(1), x['a']['b'].eq(2)), default=False) */

		suite.T().Log("About to run line #257: tbl.Filter(func(x r.Term) interface{} { return r.Or(x.AtIndex('a').Eq(1), x.AtIndex('a').AtIndex('b').Eq(2))}).OptArgs(r.FilterOpts{Default: false, })")

		runAndAssert(suite.Suite, expected_, tbl.Filter(func(x r.Term) interface{} { return r.Or(x.AtIndex("a").Eq(1), x.AtIndex("a").AtIndex("b").Eq(2)) }).OptArgs(r.FilterOpts{Default: false}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #257")
	}

	{
		// default.yaml line #261
		/* ([{}, {'a':null}, {'a':1}]) */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{}, map[interface{}]interface{}{"a": nil}, map[interface{}]interface{}{"a": 1}}
		/* tbl.filter(lambda x:r.or_(x['a'].eq(1), x['a']['b'].eq(2)), default=True).order_by('a') */

		suite.T().Log("About to run line #261: tbl.Filter(func(x r.Term) interface{} { return r.Or(x.AtIndex('a').Eq(1), x.AtIndex('a').AtIndex('b').Eq(2))}).OptArgs(r.FilterOpts{Default: true, }).OrderBy('a')")

		runAndAssert(suite.Suite, expected_, tbl.Filter(func(x r.Term) interface{} { return r.Or(x.AtIndex("a").Eq(1), x.AtIndex("a").AtIndex("b").Eq(2)) }).OptArgs(r.FilterOpts{Default: true}).OrderBy("a"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #261")
	}

	{
		// default.yaml line #265
		/* err("ReqlNonExistenceError", "No attribute `a` in object:", []) */
		var expected_ Err = err("ReqlNonExistenceError", "No attribute `a` in object:")
		/* tbl.filter(lambda x:r.or_(x['a'].eq(1), x['a']['b'].eq(2)), default=r.error()) */

		suite.T().Log("About to run line #265: tbl.Filter(func(x r.Term) interface{} { return r.Or(x.AtIndex('a').Eq(1), x.AtIndex('a').AtIndex('b').Eq(2))}).OptArgs(r.FilterOpts{Default: r.Error(), })")

		runAndAssert(suite.Suite, expected_, tbl.Filter(func(x r.Term) interface{} { return r.Or(x.AtIndex("a").Eq(1), x.AtIndex("a").AtIndex("b").Eq(2)) }).OptArgs(r.FilterOpts{Default: r.Error()}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #265")
	}

	{
		// default.yaml line #269
		/* partial({'tables_dropped':1}) */
		var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"tables_dropped": 1})
		/* r.table_drop('default_test') */

		suite.T().Log("About to run line #269: r.TableDrop('default_test')")

		runAndAssert(suite.Suite, expected_, r.TableDrop("default_test"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #269")
	}
}
コード例 #6
0
func (suite *MathLogicAddSuite) TestCases() {
	suite.T().Log("Running MathLogicAddSuite: Tests for basic usage of the add operation")

	{
		// math_logic/add.yaml line #3
		/* 2 */
		var expected_ int = 2
		/* r.add(1, 1) */

		suite.T().Log("About to run line #3: r.Add(1, 1)")

		runAndAssert(suite.Suite, expected_, r.Add(1, 1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #3")
	}

	{
		// math_logic/add.yaml line #8
		/* 2 */
		var expected_ int = 2
		/* r.expr(1) + 1 */

		suite.T().Log("About to run line #8: r.Expr(1).Add(1)")

		runAndAssert(suite.Suite, expected_, r.Expr(1).Add(1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #8")
	}

	{
		// math_logic/add.yaml line #9
		/* 2 */
		var expected_ int = 2
		/* 1 + r.expr(1) */

		suite.T().Log("About to run line #9: r.Add(1, r.Expr(1))")

		runAndAssert(suite.Suite, expected_, r.Add(1, r.Expr(1)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #9")
	}

	{
		// math_logic/add.yaml line #10
		/* 2 */
		var expected_ int = 2
		/* r.expr(1).add(1) */

		suite.T().Log("About to run line #10: r.Expr(1).Add(1)")

		runAndAssert(suite.Suite, expected_, r.Expr(1).Add(1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #10")
	}

	{
		// math_logic/add.yaml line #16
		/* 0 */
		var expected_ int = 0
		/* r.expr(-1) + 1 */

		suite.T().Log("About to run line #16: r.Expr(-1).Add(1)")

		runAndAssert(suite.Suite, expected_, r.Expr(-1).Add(1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #16")
	}

	{
		// math_logic/add.yaml line #21
		/* 10.25 */
		var expected_ float64 = 10.25
		/* r.expr(1.75) + 8.5 */

		suite.T().Log("About to run line #21: r.Expr(1.75).Add(8.5)")

		runAndAssert(suite.Suite, expected_, r.Expr(1.75).Add(8.5), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #21")
	}

	{
		// math_logic/add.yaml line #27
		/* '' */
		var expected_ string = ""
		/* r.expr('') + '' */

		suite.T().Log("About to run line #27: r.Expr('').Add('')")

		runAndAssert(suite.Suite, expected_, r.Expr("").Add(""), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #27")
	}

	{
		// math_logic/add.yaml line #32
		/* 'abcdef' */
		var expected_ string = "abcdef"
		/* r.expr('abc') + 'def' */

		suite.T().Log("About to run line #32: r.Expr('abc').Add('def')")

		runAndAssert(suite.Suite, expected_, r.Expr("abc").Add("def"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #32")
	}

	{
		// math_logic/add.yaml line #52
		/* err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", [1]) */
		var expected_ Err = err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.")
		/* r.expr(1) + 'a' */

		suite.T().Log("About to run line #52: r.Expr(1).Add('a')")

		runAndAssert(suite.Suite, expected_, r.Expr(1).Add("a"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #52")
	}

	{
		// math_logic/add.yaml line #57
		/* err("ReqlQueryLogicError", "Expected type STRING but found NUMBER.", [1]) */
		var expected_ Err = err("ReqlQueryLogicError", "Expected type STRING but found NUMBER.")
		/* r.expr('a') + 1 */

		suite.T().Log("About to run line #57: r.Expr('a').Add(1)")

		runAndAssert(suite.Suite, expected_, r.Expr("a").Add(1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #57")
	}

	{
		// math_logic/add.yaml line #62
		/* err("ReqlQueryLogicError", "Expected type ARRAY but found NUMBER.", [1]) */
		var expected_ Err = err("ReqlQueryLogicError", "Expected type ARRAY but found NUMBER.")
		/* r.expr([]) + 1 */

		suite.T().Log("About to run line #62: r.Expr([]interface{}{}).Add(1)")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{}).Add(1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #62")
	}
}
コード例 #7
0
func (suite *MutationInsertSuite) TestCases() {
	suite.T().Log("Running MutationInsertSuite: Tests insertion into tables")

	tbl := r.DB("test").Table("tbl")
	_ = tbl // Prevent any noused variable errors

	{
		// mutation/insert.yaml line #6
		/* partial({'tables_created':1}) */
		var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"tables_created": 1})
		/* r.db('test').table_create('test2') */

		suite.T().Log("About to run line #6: r.DB('test').TableCreate('test2')")

		runAndAssert(suite.Suite, expected_, r.DB("test").TableCreate("test2"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #6")
	}

	// mutation/insert.yaml line #9
	// tbl2 = r.db('test').table('test2')
	suite.T().Log("Possibly executing: var tbl2 r.Term = r.DB('test').Table('test2')")

	tbl2 := r.DB("test").Table("test2")
	_ = tbl2 // Prevent any noused variable errors

	{
		// mutation/insert.yaml line #12
		/* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':1} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 1}
		/* tbl.insert({'id':0,'a':0}) */

		suite.T().Log("About to run line #12: tbl.Insert(map[interface{}]interface{}{'id': 0, 'a': 0, })")

		runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 0, "a": 0}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #12")
	}

	{
		// mutation/insert.yaml line #14
		/* 1 */
		var expected_ int = 1
		/* tbl.count() */

		suite.T().Log("About to run line #14: tbl.Count()")

		runAndAssert(suite.Suite, expected_, tbl.Count(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #14")
	}

	{
		// mutation/insert.yaml line #18
		/* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':1} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 1}
		/* tbl.insert({'id':1, 'a':1}, durability='hard') */

		suite.T().Log("About to run line #18: tbl.Insert(map[interface{}]interface{}{'id': 1, 'a': 1, }).OptArgs(r.InsertOpts{Durability: 'hard', })")

		runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 1, "a": 1}).OptArgs(r.InsertOpts{Durability: "hard"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #18")
	}

	{
		// mutation/insert.yaml line #22
		/* 2 */
		var expected_ int = 2
		/* tbl.count() */

		suite.T().Log("About to run line #22: tbl.Count()")

		runAndAssert(suite.Suite, expected_, tbl.Count(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #22")
	}

	{
		// mutation/insert.yaml line #26
		/* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':1} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 1}
		/* tbl.insert({'id':2, 'a':2}, durability='soft') */

		suite.T().Log("About to run line #26: tbl.Insert(map[interface{}]interface{}{'id': 2, 'a': 2, }).OptArgs(r.InsertOpts{Durability: 'soft', })")

		runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 2, "a": 2}).OptArgs(r.InsertOpts{Durability: "soft"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #26")
	}

	{
		// mutation/insert.yaml line #30
		/* 3 */
		var expected_ int = 3
		/* tbl.count() */

		suite.T().Log("About to run line #30: tbl.Count()")

		runAndAssert(suite.Suite, expected_, tbl.Count(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #30")
	}

	{
		// mutation/insert.yaml line #34
		/* err('ReqlQueryLogicError', 'Durability option `wrong` unrecognized (options are "hard" and "soft").', [0]) */
		var expected_ Err = err("ReqlQueryLogicError", "Durability option `wrong` unrecognized (options are \"hard\" and \"soft\").")
		/* tbl.insert({'id':3, 'a':3}, durability='wrong') */

		suite.T().Log("About to run line #34: tbl.Insert(map[interface{}]interface{}{'id': 3, 'a': 3, }).OptArgs(r.InsertOpts{Durability: 'wrong', })")

		runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 3, "a": 3}).OptArgs(r.InsertOpts{Durability: "wrong"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #34")
	}

	{
		// mutation/insert.yaml line #38
		/* 3 */
		var expected_ int = 3
		/* tbl.count() */

		suite.T().Log("About to run line #38: tbl.Count()")

		runAndAssert(suite.Suite, expected_, tbl.Count(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #38")
	}

	{
		// mutation/insert.yaml line #42
		/* {'deleted':1,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':0} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 1, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 0}
		/* tbl.get(2).delete() */

		suite.T().Log("About to run line #42: tbl.Get(2).Delete()")

		runAndAssert(suite.Suite, expected_, tbl.Get(2).Delete(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #42")
	}

	{
		// mutation/insert.yaml line #46
		/* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':2} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 2}
		/* tbl.insert([{'id':2,'a':2}, {'id':3,'a':3}]) */

		suite.T().Log("About to run line #46: tbl.Insert([]interface{}{map[interface{}]interface{}{'id': 2, 'a': 2, }, map[interface{}]interface{}{'id': 3, 'a': 3, }})")

		runAndAssert(suite.Suite, expected_, tbl.Insert([]interface{}{map[interface{}]interface{}{"id": 2, "a": 2}, map[interface{}]interface{}{"id": 3, "a": 3}}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #46")
	}

	{
		// mutation/insert.yaml line #50
		/* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':4} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 4}
		/* tbl2.insert(tbl) */

		suite.T().Log("About to run line #50: tbl2.Insert(tbl)")

		runAndAssert(suite.Suite, expected_, tbl2.Insert(tbl), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #50")
	}

	{
		// mutation/insert.yaml line #54
		/* {'first_error':"Duplicate primary key `id`:\n{\n\t\"a\":\t2,\n\t\"id\":\t2\n}\n{\n\t\"b\":\t20,\n\t\"id\":\t2\n}",'deleted':0,'replaced':0,'unchanged':0,'errors':1,'skipped':0,'inserted':0} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"first_error": "Duplicate primary key `id`:\n{\n\t\"a\":\t2,\n\t\"id\":\t2\n}\n{\n\t\"b\":\t20,\n\t\"id\":\t2\n}", "deleted": 0, "replaced": 0, "unchanged": 0, "errors": 1, "skipped": 0, "inserted": 0}
		/* tbl.insert({'id':2,'b':20}) */

		suite.T().Log("About to run line #54: tbl.Insert(map[interface{}]interface{}{'id': 2, 'b': 20, })")

		runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 2, "b": 20}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #54")
	}

	{
		// mutation/insert.yaml line #58
		/* {'first_error':"Duplicate primary key `id`:\n{\n\t\"a\":\t2,\n\t\"id\":\t2\n}\n{\n\t\"b\":\t20,\n\t\"id\":\t2\n}",'deleted':0,'replaced':0,'unchanged':0,'errors':1,'skipped':0,'inserted':0} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"first_error": "Duplicate primary key `id`:\n{\n\t\"a\":\t2,\n\t\"id\":\t2\n}\n{\n\t\"b\":\t20,\n\t\"id\":\t2\n}", "deleted": 0, "replaced": 0, "unchanged": 0, "errors": 1, "skipped": 0, "inserted": 0}
		/* tbl.insert({'id':2,'b':20}, conflict='error') */

		suite.T().Log("About to run line #58: tbl.Insert(map[interface{}]interface{}{'id': 2, 'b': 20, }).OptArgs(r.InsertOpts{Conflict: 'error', })")

		runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 2, "b": 20}).OptArgs(r.InsertOpts{Conflict: "error"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #58")
	}

	{
		// mutation/insert.yaml line #64
		/* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':1} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 1}
		/* tbl.insert({'id':15,'b':20}, conflict='error') */

		suite.T().Log("About to run line #64: tbl.Insert(map[interface{}]interface{}{'id': 15, 'b': 20, }).OptArgs(r.InsertOpts{Conflict: 'error', })")

		runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 15, "b": 20}).OptArgs(r.InsertOpts{Conflict: "error"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #64")
	}

	{
		// mutation/insert.yaml line #69
		/* {'id':15,'b':20} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"id": 15, "b": 20}
		/* tbl.get(15) */

		suite.T().Log("About to run line #69: tbl.Get(15)")

		runAndAssert(suite.Suite, expected_, tbl.Get(15), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #69")
	}

	{
		// mutation/insert.yaml line #73
		/* {'deleted':0,'replaced':1,'unchanged':0,'errors':0,'skipped':0,'inserted':0} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 1, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 0}
		/* tbl.insert({'id':2,'b':20}, conflict='replace') */

		suite.T().Log("About to run line #73: tbl.Insert(map[interface{}]interface{}{'id': 2, 'b': 20, }).OptArgs(r.InsertOpts{Conflict: 'replace', })")

		runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 2, "b": 20}).OptArgs(r.InsertOpts{Conflict: "replace"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #73")
	}

	{
		// mutation/insert.yaml line #78
		/* {'id':2,'b':20} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"id": 2, "b": 20}
		/* tbl.get(2) */

		suite.T().Log("About to run line #78: tbl.Get(2)")

		runAndAssert(suite.Suite, expected_, tbl.Get(2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #78")
	}

	{
		// mutation/insert.yaml line #82
		/* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':1} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 1}
		/* tbl.insert({'id':20,'b':20}, conflict='replace') */

		suite.T().Log("About to run line #82: tbl.Insert(map[interface{}]interface{}{'id': 20, 'b': 20, }).OptArgs(r.InsertOpts{Conflict: 'replace', })")

		runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 20, "b": 20}).OptArgs(r.InsertOpts{Conflict: "replace"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #82")
	}

	{
		// mutation/insert.yaml line #87
		/* {'id':20,'b':20} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"id": 20, "b": 20}
		/* tbl.get(20) */

		suite.T().Log("About to run line #87: tbl.Get(20)")

		runAndAssert(suite.Suite, expected_, tbl.Get(20), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #87")
	}

	{
		// mutation/insert.yaml line #91
		/* {'deleted':0,'replaced':1,'unchanged':0,'errors':0,'skipped':0,'inserted':0} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 1, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 0}
		/* tbl.insert({'id':2,'c':30}, conflict='update') */

		suite.T().Log("About to run line #91: tbl.Insert(map[interface{}]interface{}{'id': 2, 'c': 30, }).OptArgs(r.InsertOpts{Conflict: 'update', })")

		runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 2, "c": 30}).OptArgs(r.InsertOpts{Conflict: "update"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #91")
	}

	{
		// mutation/insert.yaml line #96
		/* {'id':2, 'b':20, 'c':30} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"id": 2, "b": 20, "c": 30}
		/* tbl.get(2) */

		suite.T().Log("About to run line #96: tbl.Get(2)")

		runAndAssert(suite.Suite, expected_, tbl.Get(2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #96")
	}

	{
		// mutation/insert.yaml line #100
		/* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':1} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 1}
		/* tbl.insert({'id':30,'b':20}, conflict='update') */

		suite.T().Log("About to run line #100: tbl.Insert(map[interface{}]interface{}{'id': 30, 'b': 20, }).OptArgs(r.InsertOpts{Conflict: 'update', })")

		runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 30, "b": 20}).OptArgs(r.InsertOpts{Conflict: "update"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #100")
	}

	{
		// mutation/insert.yaml line #105
		/* {'id':30,'b':20} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"id": 30, "b": 20}
		/* tbl.get(30) */

		suite.T().Log("About to run line #105: tbl.Get(30)")

		runAndAssert(suite.Suite, expected_, tbl.Get(30), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #105")
	}

	{
		// mutation/insert.yaml line #109
		/* err('ReqlQueryLogicError', 'Conflict option `wrong` unrecognized (options are "error", "replace" and "update").', [0]) */
		var expected_ Err = err("ReqlQueryLogicError", "Conflict option `wrong` unrecognized (options are \"error\", \"replace\" and \"update\").")
		/* tbl.insert({'id':3, 'a':3}, conflict='wrong') */

		suite.T().Log("About to run line #109: tbl.Insert(map[interface{}]interface{}{'id': 3, 'a': 3, }).OptArgs(r.InsertOpts{Conflict: 'wrong', })")

		runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 3, "a": 3}).OptArgs(r.InsertOpts{Conflict: "wrong"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #109")
	}

	// mutation/insert.yaml line #120
	// tblpkey = r.db('test').table('testpkey')
	suite.T().Log("Possibly executing: var tblpkey r.Term = r.DB('test').Table('testpkey')")

	tblpkey := r.DB("test").Table("testpkey")
	_ = tblpkey // Prevent any noused variable errors

	{
		// mutation/insert.yaml line #115
		/* partial({'tables_created':1}) */
		var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"tables_created": 1})
		/* r.db('test').table_create('testpkey', primary_key='foo') */

		suite.T().Log("About to run line #115: r.DB('test').TableCreate('testpkey').OptArgs(r.TableCreateOpts{PrimaryKey: 'foo', })")

		runAndAssert(suite.Suite, expected_, r.DB("test").TableCreate("testpkey").OptArgs(r.TableCreateOpts{PrimaryKey: "foo"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #115")
	}

	{
		// mutation/insert.yaml line #122
		/* {'deleted':0,'replaced':0,'generated_keys':arrlen(1,uuid()),'unchanged':0,'errors':0,'skipped':0,'inserted':1} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "generated_keys": arrlen(1, compare.IsUUID()), "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 1}
		/* tblpkey.insert({}) */

		suite.T().Log("About to run line #122: tblpkey.Insert(map[interface{}]interface{}{})")

		runAndAssert(suite.Suite, expected_, tblpkey.Insert(map[interface{}]interface{}{}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #122")
	}

	{
		// mutation/insert.yaml line #125
		/* [{'foo':uuid()}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"foo": compare.IsUUID()}}
		/* tblpkey */

		suite.T().Log("About to run line #125: tblpkey")

		runAndAssert(suite.Suite, expected_, tblpkey, suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #125")
	}

	{
		// mutation/insert.yaml line #129
		/* {'deleted':0,'replaced':0,'generated_keys':arrlen(1,uuid()),'unchanged':0,'errors':0,'skipped':0,'inserted':1} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "generated_keys": arrlen(1, compare.IsUUID()), "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 1}
		/* tblpkey.insert({'b':20}, conflict='replace') */

		suite.T().Log("About to run line #129: tblpkey.Insert(map[interface{}]interface{}{'b': 20, }).OptArgs(r.InsertOpts{Conflict: 'replace', })")

		runAndAssert(suite.Suite, expected_, tblpkey.Insert(map[interface{}]interface{}{"b": 20}).OptArgs(r.InsertOpts{Conflict: "replace"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #129")
	}

	{
		// mutation/insert.yaml line #135
		/* {'deleted':0,'replaced':0,'generated_keys':arrlen(1,uuid()),'unchanged':0,'errors':0,'skipped':0,'inserted':1} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "generated_keys": arrlen(1, compare.IsUUID()), "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 1}
		/* tblpkey.insert({'b':20}, conflict='update') */

		suite.T().Log("About to run line #135: tblpkey.Insert(map[interface{}]interface{}{'b': 20, }).OptArgs(r.InsertOpts{Conflict: 'update', })")

		runAndAssert(suite.Suite, expected_, tblpkey.Insert(map[interface{}]interface{}{"b": 20}).OptArgs(r.InsertOpts{Conflict: "update"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #135")
	}

	{
		// mutation/insert.yaml line #140
		/* partial({'tables_dropped':1}) */
		var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"tables_dropped": 1})
		/* r.db('test').table_drop('testpkey') */

		suite.T().Log("About to run line #140: r.DB('test').TableDrop('testpkey')")

		runAndAssert(suite.Suite, expected_, r.DB("test").TableDrop("testpkey"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #140")
	}

	{
		// mutation/insert.yaml line #144
		/* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':7} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 7}
		/* tbl.for_each(lambda  row:          tbl2.insert(row.merge({'id':row['id']  +  100 }))   ) */

		suite.T().Log("About to run line #144: tbl.ForEach(func(row r.Term) interface{} { return tbl2.Insert(row.Merge(map[interface{}]interface{}{'id': row.AtIndex('id').Add(100), }))})")

		runAndAssert(suite.Suite, expected_, tbl.ForEach(func(row r.Term) interface{} {
			return tbl2.Insert(row.Merge(map[interface{}]interface{}{"id": row.AtIndex("id").Add(100)}))
		}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #144")
	}

	{
		// mutation/insert.yaml line #150
		/* partial({'errors':1,'first_error':'`r.minval` and `r.maxval` cannot be written to disk.'}) */
		var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"errors": 1, "first_error": "`r.minval` and `r.maxval` cannot be written to disk."})
		/* tbl.insert({'value':r.minval}) */

		suite.T().Log("About to run line #150: tbl.Insert(map[interface{}]interface{}{'value': r.MinVal, })")

		runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"value": r.MinVal}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #150")
	}

	{
		// mutation/insert.yaml line #154
		/* partial({'errors':1,'first_error':'`r.minval` and `r.maxval` cannot be written to disk.'}) */
		var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"errors": 1, "first_error": "`r.minval` and `r.maxval` cannot be written to disk."})
		/* tbl.insert({'value':r.maxval}) */

		suite.T().Log("About to run line #154: tbl.Insert(map[interface{}]interface{}{'value': r.MaxVal, })")

		runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"value": r.MaxVal}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #154")
	}

	{
		// mutation/insert.yaml line #159
		/* {'changes': [{'new_val': {'id': 666}, 'old_val': None},{'error': 'Duplicate primary key `id`:\n{\n\t"id":\t666\n}\n{\n\t"id":\t666\n}','new_val': {'id': 666},'old_val': {'id': 666}}],'deleted': 0,'errors': 1,'first_error': 'Duplicate primary key `id`:\n{\n\t"id":\t666\n}\n{\n\t"id":\t666\n}','inserted': 1,'replaced': 0,'skipped': 0,'unchanged': 0} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"changes": []interface{}{map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"id": 666}, "old_val": nil}, map[interface{}]interface{}{"error": "Duplicate primary key `id`:\n{\n\t\"id\":\t666\n}\n{\n\t\"id\":\t666\n}", "new_val": map[interface{}]interface{}{"id": 666}, "old_val": map[interface{}]interface{}{"id": 666}}}, "deleted": 0, "errors": 1, "first_error": "Duplicate primary key `id`:\n{\n\t\"id\":\t666\n}\n{\n\t\"id\":\t666\n}", "inserted": 1, "replaced": 0, "skipped": 0, "unchanged": 0}
		/* tbl.insert([{'id':666}, {'id':666}], return_changes="always") */

		suite.T().Log("About to run line #159: tbl.Insert([]interface{}{map[interface{}]interface{}{'id': 666, }, map[interface{}]interface{}{'id': 666, }}).OptArgs(r.InsertOpts{ReturnChanges: 'always', })")

		runAndAssert(suite.Suite, expected_, tbl.Insert([]interface{}{map[interface{}]interface{}{"id": 666}, map[interface{}]interface{}{"id": 666}}).OptArgs(r.InsertOpts{ReturnChanges: "always"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #159")
	}

	{
		// mutation/insert.yaml line #163
		/* partial({'changes':[{'old_val': None, 'new_val': {'id': 100+i, 'ordered-num': i}} for i in range(1,100)] }) */
		var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"changes": (func() []interface{} {
			res := []interface{}{}
			for iterator_ := 1; iterator_ < 100; iterator_++ {
				i := iterator_
				res = append(res, map[interface{}]interface{}{"old_val": nil, "new_val": map[interface{}]interface{}{"id": 100 + i, "ordered-num": i}})
			}
			return res
		}())})
		/* tbl.insert([{'id':100+i, 'ordered-num':i} for i in range(1,100)], return_changes="always") */

		suite.T().Log("About to run line #163: tbl.Insert((func() []interface{} {\n    res := []interface{}{}\n    for iterator_ := 1; iterator_ < 100; iterator_++ {\n        i := iterator_\n        res = append(res, map[interface{}]interface{}{'id': r.Add(100, i), 'ordered-num': i, })\n    }\n    return res\n}())).OptArgs(r.InsertOpts{ReturnChanges: 'always', })")

		runAndAssert(suite.Suite, expected_, tbl.Insert((func() []interface{} {
			res := []interface{}{}
			for iterator_ := 1; iterator_ < 100; iterator_++ {
				i := iterator_
				res = append(res, map[interface{}]interface{}{"id": r.Add(100, i), "ordered-num": i})
			}
			return res
		}())).OptArgs(r.InsertOpts{ReturnChanges: "always"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #163")
	}

	{
		// mutation/insert.yaml line #167
		/* partial({'changes':[{'old_val': None, 'new_val': {'id': [1,"blah", 200+i], 'ordered-num': i}} for i in range(1,100)] }) */
		var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"changes": (func() []interface{} {
			res := []interface{}{}
			for iterator_ := 1; iterator_ < 100; iterator_++ {
				i := iterator_
				res = append(res, map[interface{}]interface{}{"old_val": nil, "new_val": map[interface{}]interface{}{"id": []interface{}{1, "blah", 200 + i}, "ordered-num": i}})
			}
			return res
		}())})
		/* tbl.insert([{'id':[1, "blah", 200+i], 'ordered-num':i} for i in range(1,100)], return_changes="always") */

		suite.T().Log("About to run line #167: tbl.Insert((func() []interface{} {\n    res := []interface{}{}\n    for iterator_ := 1; iterator_ < 100; iterator_++ {\n        i := iterator_\n        res = append(res, map[interface{}]interface{}{'id': []interface{}{1, 'blah', r.Add(200, i)}, 'ordered-num': i, })\n    }\n    return res\n}())).OptArgs(r.InsertOpts{ReturnChanges: 'always', })")

		runAndAssert(suite.Suite, expected_, tbl.Insert((func() []interface{} {
			res := []interface{}{}
			for iterator_ := 1; iterator_ < 100; iterator_++ {
				i := iterator_
				res = append(res, map[interface{}]interface{}{"id": []interface{}{1, "blah", r.Add(200, i)}, "ordered-num": i})
			}
			return res
		}())).OptArgs(r.InsertOpts{ReturnChanges: "always"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #167")
	}

	{
		// mutation/insert.yaml line #171
		/* partial({'changes':[{'old_val': None, 'new_val': {'id': [1,"blah", 300+i], 'ordered-num': i}} for i in range(1,100)] }) */
		var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"changes": (func() []interface{} {
			res := []interface{}{}
			for iterator_ := 1; iterator_ < 100; iterator_++ {
				i := iterator_
				res = append(res, map[interface{}]interface{}{"old_val": nil, "new_val": map[interface{}]interface{}{"id": []interface{}{1, "blah", 300 + i}, "ordered-num": i}})
			}
			return res
		}())})
		/* tbl.insert([{'id':[1, "blah", 300+i], 'ordered-num':i} for i in range(1,100)], return_changes=true) */

		suite.T().Log("About to run line #171: tbl.Insert((func() []interface{} {\n    res := []interface{}{}\n    for iterator_ := 1; iterator_ < 100; iterator_++ {\n        i := iterator_\n        res = append(res, map[interface{}]interface{}{'id': []interface{}{1, 'blah', r.Add(300, i)}, 'ordered-num': i, })\n    }\n    return res\n}())).OptArgs(r.InsertOpts{ReturnChanges: true, })")

		runAndAssert(suite.Suite, expected_, tbl.Insert((func() []interface{} {
			res := []interface{}{}
			for iterator_ := 1; iterator_ < 100; iterator_++ {
				i := iterator_
				res = append(res, map[interface{}]interface{}{"id": []interface{}{1, "blah", r.Add(300, i)}, "ordered-num": i})
			}
			return res
		}())).OptArgs(r.InsertOpts{ReturnChanges: true}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #171")
	}

	{
		// mutation/insert.yaml line #175
		/* partial({'changes':[{'old_val': {'id':100+i, 'ordered-num':i}, 'new_val': {'id':100+i, 'ordered-num':i}, 'error':'Duplicate primary key `id`:\n{\n\t"id":\t'+str(100+i)+',\n\t"ordered-num":\t'+str(i)+'\n}\n{\n\t"id":\t'+str(100+i)+',\n\t"ordered-num":\t'+str(i)+'\n}'} for i in range(1,100)]}) */
		var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"changes": (func() []interface{} {
			res := []interface{}{}
			for iterator_ := 1; iterator_ < 100; iterator_++ {
				i := iterator_
				res = append(res, map[interface{}]interface{}{"old_val": map[interface{}]interface{}{"id": 100 + i, "ordered-num": i}, "new_val": map[interface{}]interface{}{"id": 100 + i, "ordered-num": i}, "error": "Duplicate primary key `id`:\n{\n\t\"id\":\t" + str(100+i) + ",\n\t\"ordered-num\":\t" + str(i) + "\n}\n{\n\t\"id\":\t" + str(100+i) + ",\n\t\"ordered-num\":\t" + str(i) + "\n}"})
			}
			return res
		}())})
		/* tbl.insert([{'id':100 + i, 'ordered-num':i} for i in range(1,100)], return_changes="always") */

		suite.T().Log("About to run line #175: tbl.Insert((func() []interface{} {\n    res := []interface{}{}\n    for iterator_ := 1; iterator_ < 100; iterator_++ {\n        i := iterator_\n        res = append(res, map[interface{}]interface{}{'id': r.Add(100, i), 'ordered-num': i, })\n    }\n    return res\n}())).OptArgs(r.InsertOpts{ReturnChanges: 'always', })")

		runAndAssert(suite.Suite, expected_, tbl.Insert((func() []interface{} {
			res := []interface{}{}
			for iterator_ := 1; iterator_ < 100; iterator_++ {
				i := iterator_
				res = append(res, map[interface{}]interface{}{"id": r.Add(100, i), "ordered-num": i})
			}
			return res
		}())).OptArgs(r.InsertOpts{ReturnChanges: "always"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #175")
	}

	{
		// mutation/insert.yaml line #179
		/* {'changes': [{'error': 'Duplicate primary key `id`:\n{\n\t"id":\t123,\n\t"ordered-num":\t23\n}\n{\n\t"id":\t123\n}', 'new_val': {'id': 123, 'ordered-num': 23}, 'old_val': {'id': 123, 'ordered-num': 23}}, {'error': 'Primary key too long (max 127 characters): "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"', 'new_val': None, 'old_val': None}, {'new_val': {'id': 321}, 'old_val': None}], 'deleted': 0, 'errors': 2, 'first_error': 'Primary key too long (max 127 characters): "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"', 'inserted': 1, 'replaced': 0, 'skipped': 0, 'unchanged': 0} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"changes": []interface{}{map[interface{}]interface{}{"error": "Duplicate primary key `id`:\n{\n\t\"id\":\t123,\n\t\"ordered-num\":\t23\n}\n{\n\t\"id\":\t123\n}", "new_val": map[interface{}]interface{}{"id": 123, "ordered-num": 23}, "old_val": map[interface{}]interface{}{"id": 123, "ordered-num": 23}}, map[interface{}]interface{}{"error": "Primary key too long (max 127 characters): \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"", "new_val": nil, "old_val": nil}, map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"id": 321}, "old_val": nil}}, "deleted": 0, "errors": 2, "first_error": "Primary key too long (max 127 characters): \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"", "inserted": 1, "replaced": 0, "skipped": 0, "unchanged": 0}
		/* tbl.insert([{'id':123}, {'id':'a'*500}, {'id':321}], return_changes="always") */

		suite.T().Log("About to run line #179: tbl.Insert([]interface{}{map[interface{}]interface{}{'id': 123, }, map[interface{}]interface{}{'id': 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', }, map[interface{}]interface{}{'id': 321, }}).OptArgs(r.InsertOpts{ReturnChanges: 'always', })")

		runAndAssert(suite.Suite, expected_, tbl.Insert([]interface{}{map[interface{}]interface{}{"id": 123}, map[interface{}]interface{}{"id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}, map[interface{}]interface{}{"id": 321}}).OptArgs(r.InsertOpts{ReturnChanges: "always"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #179")
	}

	{
		// mutation/insert.yaml line #183
		/* partial({'changes':[]}) */
		var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"changes": []interface{}{}})
		/* tbl.insert([{'id':100 + i, 'ordered-num':i} for i in range(1,100)], return_changes=true) */

		suite.T().Log("About to run line #183: tbl.Insert((func() []interface{} {\n    res := []interface{}{}\n    for iterator_ := 1; iterator_ < 100; iterator_++ {\n        i := iterator_\n        res = append(res, map[interface{}]interface{}{'id': r.Add(100, i), 'ordered-num': i, })\n    }\n    return res\n}())).OptArgs(r.InsertOpts{ReturnChanges: true, })")

		runAndAssert(suite.Suite, expected_, tbl.Insert((func() []interface{} {
			res := []interface{}{}
			for iterator_ := 1; iterator_ < 100; iterator_++ {
				i := iterator_
				res = append(res, map[interface{}]interface{}{"id": r.Add(100, i), "ordered-num": i})
			}
			return res
		}())).OptArgs(r.InsertOpts{ReturnChanges: true}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #183")
	}

	{
		// mutation/insert.yaml line #186
		/* partial({'changes': [{'old_val': None, 'new_val': None, 'error': '`r.minval` and `r.maxval` cannot be written to disk.'}]}) */
		var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"changes": []interface{}{map[interface{}]interface{}{"old_val": nil, "new_val": nil, "error": "`r.minval` and `r.maxval` cannot be written to disk."}}})
		/* tbl.insert({'a':r.minval}, return_changes="always") */

		suite.T().Log("About to run line #186: tbl.Insert(map[interface{}]interface{}{'a': r.MinVal, }).OptArgs(r.InsertOpts{ReturnChanges: 'always', })")

		runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"a": r.MinVal}).OptArgs(r.InsertOpts{ReturnChanges: "always"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #186")
	}

	{
		// mutation/insert.yaml line #192
		/* partial({'inserted':1}) */
		var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"inserted": 1})
		/* tbl.insert({'id':42, 'foo':1, 'bar':1}) */

		suite.T().Log("About to run line #192: tbl.Insert(map[interface{}]interface{}{'id': 42, 'foo': 1, 'bar': 1, })")

		runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 42, "foo": 1, "bar": 1}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #192")
	}

	{
		// mutation/insert.yaml line #194
		/* partial({'replaced':1}) */
		var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"replaced": 1})
		/* tbl.insert({'id':42, 'foo':5, 'bar':5}, conflict=lambda id, old_row, new_row: old_row.merge(new_row.pluck("bar"))) */

		suite.T().Log("About to run line #194: tbl.Insert(map[interface{}]interface{}{'id': 42, 'foo': 5, 'bar': 5, }).OptArgs(r.InsertOpts{Conflict: func(id r.Term, old_row r.Term, new_row r.Term) interface{} { return old_row.Merge(new_row.Pluck('bar'))}, })")

		runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 42, "foo": 5, "bar": 5}).OptArgs(r.InsertOpts{Conflict: func(id r.Term, old_row r.Term, new_row r.Term) interface{} {
			return old_row.Merge(new_row.Pluck("bar"))
		}}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #194")
	}

	{
		// mutation/insert.yaml line #196
		/* {'id':42, 'foo':1, 'bar':5} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"id": 42, "foo": 1, "bar": 5}
		/* tbl.get(42) */

		suite.T().Log("About to run line #196: tbl.Get(42)")

		runAndAssert(suite.Suite, expected_, tbl.Get(42), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #196")
	}

	{
		// mutation/insert.yaml line #214
		/* partial({'first_error': 'Inserted value must be an OBJECT (got NUMBER):\n2'}) */
		var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"first_error": "Inserted value must be an OBJECT (got NUMBER):\n2"})
		/* tbl.insert({'id':42, 'foo':1, 'bar':1}, conflict=lambda a,b,c: 2) */

		suite.T().Log("About to run line #214: tbl.Insert(map[interface{}]interface{}{'id': 42, 'foo': 1, 'bar': 1, }).OptArgs(r.InsertOpts{Conflict: func(a r.Term, b r.Term, c r.Term) interface{} { return 2}, })")

		runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 42, "foo": 1, "bar": 1}).OptArgs(r.InsertOpts{Conflict: func(a r.Term, b r.Term, c r.Term) interface{} { return 2 }}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #214")
	}

	{
		// mutation/insert.yaml line #218
		/* err("ReqlQueryLogicError", "The conflict function passed to `insert` should expect 3 arguments.") */
		var expected_ Err = err("ReqlQueryLogicError", "The conflict function passed to `insert` should expect 3 arguments.")
		/* tbl.insert({'id':42}, conflict=lambda a,b: a) */

		suite.T().Log("About to run line #218: tbl.Insert(map[interface{}]interface{}{'id': 42, }).OptArgs(r.InsertOpts{Conflict: func(a r.Term, b r.Term) interface{} { return a}, })")

		runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 42}).OptArgs(r.InsertOpts{Conflict: func(a r.Term, b r.Term) interface{} { return a }}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #218")
	}

	{
		// mutation/insert.yaml line #222
		/* err("ReqlQueryLogicError", "The conflict function passed to `insert` must be deterministic.") */
		var expected_ Err = err("ReqlQueryLogicError", "The conflict function passed to `insert` must be deterministic.")
		/* tbl.insert({'id':42}, conflict=lambda a,b,c: tbl.get(42)) */

		suite.T().Log("About to run line #222: tbl.Insert(map[interface{}]interface{}{'id': 42, }).OptArgs(r.InsertOpts{Conflict: func(a r.Term, b r.Term, c r.Term) interface{} { return tbl.Get(42)}, })")

		runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 42}).OptArgs(r.InsertOpts{Conflict: func(a r.Term, b r.Term, c r.Term) interface{} { return tbl.Get(42) }}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #222")
	}

	{
		// mutation/insert.yaml line #225
		/* partial({'replaced': 1}) */
		var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"replaced": 1})
		/* tbl.insert({'id':42}, conflict=lambda a,b,c: {'id':42, 'num':'424'}) */

		suite.T().Log("About to run line #225: tbl.Insert(map[interface{}]interface{}{'id': 42, }).OptArgs(r.InsertOpts{Conflict: func(a r.Term, b r.Term, c r.Term) interface{} { return map[interface{}]interface{}{'id': 42, 'num': '424', }}, })")

		runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 42}).OptArgs(r.InsertOpts{Conflict: func(a r.Term, b r.Term, c r.Term) interface{} {
			return map[interface{}]interface{}{"id": 42, "num": "424"}
		}}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #225")
	}

	{
		// mutation/insert.yaml line #227
		/* {'id':42, 'num':'424'} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"id": 42, "num": "424"}
		/* tbl.get(42) */

		suite.T().Log("About to run line #227: tbl.Get(42)")

		runAndAssert(suite.Suite, expected_, tbl.Get(42), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #227")
	}

	{
		// mutation/insert.yaml line #231
		/* err('ReqlQueryLogicError','Cannot convert `r.minval` to JSON.') */
		var expected_ Err = err("ReqlQueryLogicError", "Cannot convert `r.minval` to JSON.")
		/* r.minval */

		suite.T().Log("About to run line #231: r.MinVal")

		runAndAssert(suite.Suite, expected_, r.MinVal, suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #231")
	}

	{
		// mutation/insert.yaml line #234
		/* err('ReqlQueryLogicError','Cannot convert `r.maxval` to JSON.') */
		var expected_ Err = err("ReqlQueryLogicError", "Cannot convert `r.maxval` to JSON.")
		/* r.maxval */

		suite.T().Log("About to run line #234: r.MaxVal")

		runAndAssert(suite.Suite, expected_, r.MaxVal, suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #234")
	}

	{
		// mutation/insert.yaml line #238
		/* partial({'tables_dropped':1}) */
		var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"tables_dropped": 1})
		/* r.db('test').table_drop('test2') */

		suite.T().Log("About to run line #238: r.DB('test').TableDrop('test2')")

		runAndAssert(suite.Suite, expected_, r.DB("test").TableDrop("test2"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #238")
	}
}
コード例 #8
0
func (suite *TransformArraySuite) TestCases() {
	suite.T().Log("Running TransformArraySuite: Tests manipulation operations on arrays")

	// transform/array.yaml line #5
	// arr = r.expr([1, 2, 3])
	suite.T().Log("Possibly executing: var arr r.Term = r.Expr([]interface{}{1, 2, 3})")

	arr := r.Expr([]interface{}{1, 2, 3})
	_ = arr // Prevent any noused variable errors

	// transform/array.yaml line #6
	// dupe_arr = r.expr([1, 1, 2, 3])
	suite.T().Log("Possibly executing: var dupe_arr r.Term = r.Expr([]interface{}{1, 1, 2, 3})")

	dupe_arr := r.Expr([]interface{}{1, 1, 2, 3})
	_ = dupe_arr // Prevent any noused variable errors

	// transform/array.yaml line #7
	// objArr = r.expr([{'a':1, 'b':'a'}, {'a':2, 'b':'b'}, {'a':3, 'b':'c'}])
	suite.T().Log("Possibly executing: var objArr r.Term = r.Expr([]interface{}{map[interface{}]interface{}{'a': 1, 'b': 'a', }, map[interface{}]interface{}{'a': 2, 'b': 'b', }, map[interface{}]interface{}{'a': 3, 'b': 'c', }})")

	objArr := r.Expr([]interface{}{map[interface{}]interface{}{"a": 1, "b": "a"}, map[interface{}]interface{}{"a": 2, "b": "b"}, map[interface{}]interface{}{"a": 3, "b": "c"}})
	_ = objArr // Prevent any noused variable errors

	// transform/array.yaml line #8
	// nestedObjArr = r.expr([{'a':1, 'b':{'c':1}}, {'a':2, 'b':{'c':2}}, {'a':3, 'b':{'c':3}}])
	suite.T().Log("Possibly executing: var nestedObjArr r.Term = r.Expr([]interface{}{map[interface{}]interface{}{'a': 1, 'b': map[interface{}]interface{}{'c': 1, }, }, map[interface{}]interface{}{'a': 2, 'b': map[interface{}]interface{}{'c': 2, }, }, map[interface{}]interface{}{'a': 3, 'b': map[interface{}]interface{}{'c': 3, }, }})")

	nestedObjArr := r.Expr([]interface{}{map[interface{}]interface{}{"a": 1, "b": map[interface{}]interface{}{"c": 1}}, map[interface{}]interface{}{"a": 2, "b": map[interface{}]interface{}{"c": 2}}, map[interface{}]interface{}{"a": 3, "b": map[interface{}]interface{}{"c": 3}}})
	_ = nestedObjArr // Prevent any noused variable errors

	{
		// transform/array.yaml line #12
		/* [1,2,3,4] */
		var expected_ []interface{} = []interface{}{1, 2, 3, 4}
		/* arr.append(4) */

		suite.T().Log("About to run line #12: arr.Append(4)")

		runAndAssert(suite.Suite, expected_, arr.Append(4), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #12")
	}

	{
		// transform/array.yaml line #14
		/* [1,2,3,'a'] */
		var expected_ []interface{} = []interface{}{1, 2, 3, "a"}
		/* arr.append('a') */

		suite.T().Log("About to run line #14: arr.Append('a')")

		runAndAssert(suite.Suite, expected_, arr.Append("a"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #14")
	}

	{
		// transform/array.yaml line #19
		/* [0,1,2,3] */
		var expected_ []interface{} = []interface{}{0, 1, 2, 3}
		/* arr.prepend(0) */

		suite.T().Log("About to run line #19: arr.Prepend(0)")

		runAndAssert(suite.Suite, expected_, arr.Prepend(0), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #19")
	}

	{
		// transform/array.yaml line #21
		/* ['a',1,2,3] */
		var expected_ []interface{} = []interface{}{"a", 1, 2, 3}
		/* arr.prepend('a') */

		suite.T().Log("About to run line #21: arr.Prepend('a')")

		runAndAssert(suite.Suite, expected_, arr.Prepend("a"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #21")
	}

	{
		// transform/array.yaml line #26
		/* [3] */
		var expected_ []interface{} = []interface{}{3}
		/* arr.difference([1,2,2]) */

		suite.T().Log("About to run line #26: arr.Difference([]interface{}{1, 2, 2})")

		runAndAssert(suite.Suite, expected_, arr.Difference([]interface{}{1, 2, 2}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #26")
	}

	{
		// transform/array.yaml line #28
		/* [1,2,3] */
		var expected_ []interface{} = []interface{}{1, 2, 3}
		/* arr.difference([]) */

		suite.T().Log("About to run line #28: arr.Difference([]interface{}{})")

		runAndAssert(suite.Suite, expected_, arr.Difference([]interface{}{}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #28")
	}

	{
		// transform/array.yaml line #30
		/* [1,2,3] */
		var expected_ []interface{} = []interface{}{1, 2, 3}
		/* arr.difference(["foo", "bar"]) */

		suite.T().Log("About to run line #30: arr.Difference([]interface{}{'foo', 'bar'})")

		runAndAssert(suite.Suite, expected_, arr.Difference([]interface{}{"foo", "bar"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #30")
	}

	{
		// transform/array.yaml line #34
		/* [1,2,3] */
		var expected_ []interface{} = []interface{}{1, 2, 3}
		/* dupe_arr.set_insert(1) */

		suite.T().Log("About to run line #34: dupe_arr.SetInsert(1)")

		runAndAssert(suite.Suite, expected_, dupe_arr.SetInsert(1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #34")
	}

	{
		// transform/array.yaml line #36
		/* [1,2,3,4] */
		var expected_ []interface{} = []interface{}{1, 2, 3, 4}
		/* dupe_arr.set_insert(4) */

		suite.T().Log("About to run line #36: dupe_arr.SetInsert(4)")

		runAndAssert(suite.Suite, expected_, dupe_arr.SetInsert(4), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #36")
	}

	{
		// transform/array.yaml line #39
		/* [1,2,3,4,5] */
		var expected_ []interface{} = []interface{}{1, 2, 3, 4, 5}
		/* dupe_arr.set_union([3,4,5,5]) */

		suite.T().Log("About to run line #39: dupe_arr.SetUnion([]interface{}{3, 4, 5, 5})")

		runAndAssert(suite.Suite, expected_, dupe_arr.SetUnion([]interface{}{3, 4, 5, 5}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #39")
	}

	{
		// transform/array.yaml line #41
		/* [1,2,3,5,6] */
		var expected_ []interface{} = []interface{}{1, 2, 3, 5, 6}
		/* dupe_arr.set_union([5,6]) */

		suite.T().Log("About to run line #41: dupe_arr.SetUnion([]interface{}{5, 6})")

		runAndAssert(suite.Suite, expected_, dupe_arr.SetUnion([]interface{}{5, 6}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #41")
	}

	{
		// transform/array.yaml line #44
		/* [1,2] */
		var expected_ []interface{} = []interface{}{1, 2}
		/* dupe_arr.set_intersection([1,1,1,2,2]) */

		suite.T().Log("About to run line #44: dupe_arr.SetIntersection([]interface{}{1, 1, 1, 2, 2})")

		runAndAssert(suite.Suite, expected_, dupe_arr.SetIntersection([]interface{}{1, 1, 1, 2, 2}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #44")
	}

	{
		// transform/array.yaml line #46
		/* [] */
		var expected_ []interface{} = []interface{}{}
		/* dupe_arr.set_intersection(["foo"]) */

		suite.T().Log("About to run line #46: dupe_arr.SetIntersection([]interface{}{'foo'})")

		runAndAssert(suite.Suite, expected_, dupe_arr.SetIntersection([]interface{}{"foo"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #46")
	}

	{
		// transform/array.yaml line #49
		/* [2,3] */
		var expected_ []interface{} = []interface{}{2, 3}
		/* dupe_arr.set_difference([1,1,1,10]) */

		suite.T().Log("About to run line #49: dupe_arr.SetDifference([]interface{}{1, 1, 1, 10})")

		runAndAssert(suite.Suite, expected_, dupe_arr.SetDifference([]interface{}{1, 1, 1, 10}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #49")
	}

	{
		// transform/array.yaml line #51
		/* [1,3] */
		var expected_ []interface{} = []interface{}{1, 3}
		/* dupe_arr.set_difference([2]) */

		suite.T().Log("About to run line #51: dupe_arr.SetDifference([]interface{}{2})")

		runAndAssert(suite.Suite, expected_, dupe_arr.SetDifference([]interface{}{2}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #51")
	}

	{
		// transform/array.yaml line #58
		/* [2, 3] */
		var expected_ []interface{} = []interface{}{2, 3}
		/* arr[1:3] */

		suite.T().Log("About to run line #58: arr.Slice(1, 3)")

		runAndAssert(suite.Suite, expected_, arr.Slice(1, 3), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #58")
	}

	{
		// transform/array.yaml line #59
		/* [2, 3] */
		var expected_ []interface{} = []interface{}{2, 3}
		/* arr.slice(1, 3) */

		suite.T().Log("About to run line #59: arr.Slice(1, 3)")

		runAndAssert(suite.Suite, expected_, arr.Slice(1, 3), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #59")
	}

	{
		// transform/array.yaml line #60
		/* [2, 3] */
		var expected_ []interface{} = []interface{}{2, 3}
		/* arr.slice(1, 2, right_bound='closed') */

		suite.T().Log("About to run line #60: arr.Slice(1, 2).OptArgs(r.SliceOpts{RightBound: 'closed', })")

		runAndAssert(suite.Suite, expected_, arr.Slice(1, 2).OptArgs(r.SliceOpts{RightBound: "closed"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #60")
	}

	{
		// transform/array.yaml line #72
		/* [1,2] */
		var expected_ []interface{} = []interface{}{1, 2}
		/* arr[:2] */

		suite.T().Log("About to run line #72: arr.Slice(0, 2)")

		runAndAssert(suite.Suite, expected_, arr.Slice(0, 2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #72")
	}

	{
		// transform/array.yaml line #73
		/* [1,2] */
		var expected_ []interface{} = []interface{}{1, 2}
		/* arr.slice(0,2) */

		suite.T().Log("About to run line #73: arr.Slice(0, 2)")

		runAndAssert(suite.Suite, expected_, arr.Slice(0, 2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #73")
	}

	{
		// transform/array.yaml line #81
		/* [2,3] */
		var expected_ []interface{} = []interface{}{2, 3}
		/* arr[1:] */

		suite.T().Log("About to run line #81: arr.Slice(1, -1, r.SliceOpts{RightBound: 'closed'})")

		runAndAssert(suite.Suite, expected_, arr.Slice(1, -1, r.SliceOpts{RightBound: "closed"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #81")
	}

	{
		// transform/array.yaml line #82
		/* [2,3] */
		var expected_ []interface{} = []interface{}{2, 3}
		/* arr.slice(1) */

		suite.T().Log("About to run line #82: arr.Slice(1)")

		runAndAssert(suite.Suite, expected_, arr.Slice(1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #82")
	}

	{
		// transform/array.yaml line #89
		/* [2] */
		var expected_ []interface{} = []interface{}{2}
		/* arr.slice(-2, -1) */

		suite.T().Log("About to run line #89: arr.Slice(-2, -1)")

		runAndAssert(suite.Suite, expected_, arr.Slice(-2, -1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #89")
	}

	{
		// transform/array.yaml line #95
		/* [2,3] */
		var expected_ []interface{} = []interface{}{2, 3}
		/* arr.skip(1) */

		suite.T().Log("About to run line #95: arr.Skip(1)")

		runAndAssert(suite.Suite, expected_, arr.Skip(1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #95")
	}

	{
		// transform/array.yaml line #97
		/* [3] */
		var expected_ []interface{} = []interface{}{3}
		/* arr.skip(2) */

		suite.T().Log("About to run line #97: arr.Skip(2)")

		runAndAssert(suite.Suite, expected_, arr.Skip(2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #97")
	}

	{
		// transform/array.yaml line #99
		/* [] */
		var expected_ []interface{} = []interface{}{}
		/* arr.skip(12) */

		suite.T().Log("About to run line #99: arr.Skip(12)")

		runAndAssert(suite.Suite, expected_, arr.Skip(12), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #99")
	}

	{
		// transform/array.yaml line #104
		/* [1,2] */
		var expected_ []interface{} = []interface{}{1, 2}
		/* arr.limit(2) */

		suite.T().Log("About to run line #104: arr.Limit(2)")

		runAndAssert(suite.Suite, expected_, arr.Limit(2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #104")
	}

	{
		// transform/array.yaml line #106
		/* [] */
		var expected_ []interface{} = []interface{}{}
		/* arr.limit(0) */

		suite.T().Log("About to run line #106: arr.Limit(0)")

		runAndAssert(suite.Suite, expected_, arr.Limit(0), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #106")
	}

	{
		// transform/array.yaml line #108
		/* [1,2,3] */
		var expected_ []interface{} = []interface{}{1, 2, 3}
		/* arr.limit(12) */

		suite.T().Log("About to run line #108: arr.Limit(12)")

		runAndAssert(suite.Suite, expected_, arr.Limit(12), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #108")
	}

	{
		// transform/array.yaml line #113
		/* [{'a':1, 'b':'a'}, {'a':2, 'b':'b'}, {'a':3, 'b':'c'}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"a": 1, "b": "a"}, map[interface{}]interface{}{"a": 2, "b": "b"}, map[interface{}]interface{}{"a": 3, "b": "c"}}
		/* objArr.pluck('a', 'b') */

		suite.T().Log("About to run line #113: objArr.Pluck('a', 'b')")

		runAndAssert(suite.Suite, expected_, objArr.Pluck("a", "b"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #113")
	}

	{
		// transform/array.yaml line #115
		/* [{'a':1}, {'a':2}, {'a':3}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"a": 1}, map[interface{}]interface{}{"a": 2}, map[interface{}]interface{}{"a": 3}}
		/* objArr.pluck('a') */

		suite.T().Log("About to run line #115: objArr.Pluck('a')")

		runAndAssert(suite.Suite, expected_, objArr.Pluck("a"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #115")
	}

	{
		// transform/array.yaml line #117
		/* [{}, {}, {}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{}, map[interface{}]interface{}{}, map[interface{}]interface{}{}}
		/* objArr.pluck() */

		suite.T().Log("About to run line #117: objArr.Pluck()")

		runAndAssert(suite.Suite, expected_, objArr.Pluck(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #117")
	}

	// transform/array.yaml line #121
	// wftst = objArr.union(objArr.pluck('a')).union(objArr.pluck('b')).union([{'a':null}])
	suite.T().Log("Possibly executing: var wftst r.Term = objArr.Union(objArr.Pluck('a')).Union(objArr.Pluck('b')).Union([]interface{}{map[interface{}]interface{}{'a': nil, }})")

	wftst := objArr.Union(objArr.Pluck("a")).Union(objArr.Pluck("b")).Union([]interface{}{map[interface{}]interface{}{"a": nil}})
	_ = wftst // Prevent any noused variable errors

	{
		// transform/array.yaml line #122
		/* ([{'a':1},{'a':2},{'a':3},{'a':1},{'a':2},{'a':3}]) */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"a": 1}, map[interface{}]interface{}{"a": 2}, map[interface{}]interface{}{"a": 3}, map[interface{}]interface{}{"a": 1}, map[interface{}]interface{}{"a": 2}, map[interface{}]interface{}{"a": 3}}
		/* wftst.with_fields('a') */

		suite.T().Log("About to run line #122: wftst.WithFields('a')")

		runAndAssert(suite.Suite, expected_, wftst.WithFields("a"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #122")
	}

	{
		// transform/array.yaml line #124
		/* ([{'b':'a'},{'b':'b'},{'b':'c'},{'b':'a'},{'b':'b'},{'b':'c'}]) */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"b": "a"}, map[interface{}]interface{}{"b": "b"}, map[interface{}]interface{}{"b": "c"}, map[interface{}]interface{}{"b": "a"}, map[interface{}]interface{}{"b": "b"}, map[interface{}]interface{}{"b": "c"}}
		/* wftst.with_fields('b') */

		suite.T().Log("About to run line #124: wftst.WithFields('b')")

		runAndAssert(suite.Suite, expected_, wftst.WithFields("b"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #124")
	}

	{
		// transform/array.yaml line #126
		/* ([{'a':1,'b':'a'},{'a':2,'b':'b'},{'a':3,'b':'c'}]) */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"a": 1, "b": "a"}, map[interface{}]interface{}{"a": 2, "b": "b"}, map[interface{}]interface{}{"a": 3, "b": "c"}}
		/* wftst.with_fields('a', 'b') */

		suite.T().Log("About to run line #126: wftst.WithFields('a', 'b')")

		runAndAssert(suite.Suite, expected_, wftst.WithFields("a", "b"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #126")
	}

	{
		// transform/array.yaml line #128
		/* [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{}, map[interface{}]interface{}{}, map[interface{}]interface{}{}, map[interface{}]interface{}{}, map[interface{}]interface{}{}, map[interface{}]interface{}{}, map[interface{}]interface{}{}, map[interface{}]interface{}{}, map[interface{}]interface{}{}, map[interface{}]interface{}{}}
		/* wftst.with_fields() */

		suite.T().Log("About to run line #128: wftst.WithFields()")

		runAndAssert(suite.Suite, expected_, wftst.WithFields(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #128")
	}

	// transform/array.yaml line #131
	// wftst2 = nestedObjArr.union(objArr.pluck({'b':'missing'})).union(nestedObjArr.pluck({'b':'c'}))
	suite.T().Log("Possibly executing: var wftst2 r.Term = nestedObjArr.Union(objArr.Pluck(map[interface{}]interface{}{'b': 'missing', })).Union(nestedObjArr.Pluck(map[interface{}]interface{}{'b': 'c', }))")

	wftst2 := nestedObjArr.Union(objArr.Pluck(map[interface{}]interface{}{"b": "missing"})).Union(nestedObjArr.Pluck(map[interface{}]interface{}{"b": "c"}))
	_ = wftst2 // Prevent any noused variable errors

	{
		// transform/array.yaml line #132
		/* ([{'b':{'c':1}}, {'b':{'c':2}}, {'b':{'c':3}}, {'b':{'c':1}}, {'b':{'c':2}}, {'b':{'c':3}}]) */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"b": map[interface{}]interface{}{"c": 1}}, map[interface{}]interface{}{"b": map[interface{}]interface{}{"c": 2}}, map[interface{}]interface{}{"b": map[interface{}]interface{}{"c": 3}}, map[interface{}]interface{}{"b": map[interface{}]interface{}{"c": 1}}, map[interface{}]interface{}{"b": map[interface{}]interface{}{"c": 2}}, map[interface{}]interface{}{"b": map[interface{}]interface{}{"c": 3}}}
		/* wftst2.with_fields({'b':'c'}) */

		suite.T().Log("About to run line #132: wftst2.WithFields(map[interface{}]interface{}{'b': 'c', })")

		runAndAssert(suite.Suite, expected_, wftst2.WithFields(map[interface{}]interface{}{"b": "c"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #132")
	}

	{
		// transform/array.yaml line #135
		/* err("ReqlQueryLogicError", "Invalid path argument `1`.", []) */
		var expected_ Err = err("ReqlQueryLogicError", "Invalid path argument `1`.")
		/* wftst.with_fields(1) */

		suite.T().Log("About to run line #135: wftst.WithFields(1)")

		runAndAssert(suite.Suite, expected_, wftst.WithFields(1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #135")
	}

	{
		// transform/array.yaml line #137
		/* err("ReqlQueryLogicError", "Cannot perform has_fields on a non-object non-sequence `1`.", []) */
		var expected_ Err = err("ReqlQueryLogicError", "Cannot perform has_fields on a non-object non-sequence `1`.")
		/* r.expr(1).with_fields() */

		suite.T().Log("About to run line #137: r.Expr(1).WithFields()")

		runAndAssert(suite.Suite, expected_, r.Expr(1).WithFields(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #137")
	}

	{
		// transform/array.yaml line #142
		/* [{}, {}, {}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{}, map[interface{}]interface{}{}, map[interface{}]interface{}{}}
		/* objArr.without('a', 'b') */

		suite.T().Log("About to run line #142: objArr.Without('a', 'b')")

		runAndAssert(suite.Suite, expected_, objArr.Without("a", "b"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #142")
	}

	{
		// transform/array.yaml line #144
		/* [{'b':'a'}, {'b':'b'}, {'b':'c'}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"b": "a"}, map[interface{}]interface{}{"b": "b"}, map[interface{}]interface{}{"b": "c"}}
		/* objArr.without('a') */

		suite.T().Log("About to run line #144: objArr.Without('a')")

		runAndAssert(suite.Suite, expected_, objArr.Without("a"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #144")
	}

	{
		// transform/array.yaml line #146
		/* [{'a':1, 'b':'a'}, {'a':2, 'b':'b'}, {'a':3, 'b':'c'}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"a": 1, "b": "a"}, map[interface{}]interface{}{"a": 2, "b": "b"}, map[interface{}]interface{}{"a": 3, "b": "c"}}
		/* objArr.without() */

		suite.T().Log("About to run line #146: objArr.Without()")

		runAndAssert(suite.Suite, expected_, objArr.Without(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #146")
	}

	{
		// transform/array.yaml line #151
		/* [2,3,4] */
		var expected_ []interface{} = []interface{}{2, 3, 4}
		/* arr.map(lambda v: v + 1) */

		suite.T().Log("About to run line #151: arr.Map(func(v r.Term) interface{} { return r.Add(v, 1)})")

		runAndAssert(suite.Suite, expected_, arr.Map(func(v r.Term) interface{} { return r.Add(v, 1) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #151")
	}

	{
		// transform/array.yaml line #161
		/* 6 */
		var expected_ int = 6
		/* arr.reduce(lambda a, b: a + b) */

		suite.T().Log("About to run line #161: arr.Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)})")

		runAndAssert(suite.Suite, expected_, arr.Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #161")
	}

	{
		// transform/array.yaml line #166
		/* 6 */
		var expected_ int = 6
		/* arr.reduce(lambda a, b:a + b) */

		suite.T().Log("About to run line #166: arr.Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)})")

		runAndAssert(suite.Suite, expected_, arr.Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #166")
	}

	{
		// transform/array.yaml line #171
		/* 12 */
		var expected_ int = 12
		/* arr.union(arr).reduce(lambda a, b: a + b) */

		suite.T().Log("About to run line #171: arr.Union(arr).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)})")

		runAndAssert(suite.Suite, expected_, arr.Union(arr).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #171")
	}

	{
		// transform/array.yaml line #176
		/* 12 */
		var expected_ int = 12
		/* arr.union(arr).reduce(lambda a, b:a + b) */

		suite.T().Log("About to run line #176: arr.Union(arr).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)})")

		runAndAssert(suite.Suite, expected_, arr.Union(arr).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #176")
	}

	{
		// transform/array.yaml line #183
		/* [{'a':2, 'b':'b'}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"a": 2, "b": "b"}}
		/* objArr.filter(lambda row: row['b'] == 'b') */

		suite.T().Log("About to run line #183: objArr.Filter(func(row r.Term) interface{} { return row.AtIndex('b').Eq('b')})")

		runAndAssert(suite.Suite, expected_, objArr.Filter(func(row r.Term) interface{} { return row.AtIndex("b").Eq("b") }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #183")
	}

	{
		// transform/array.yaml line #190
		/* [1,2,1,2,1,2] */
		var expected_ []interface{} = []interface{}{1, 2, 1, 2, 1, 2}
		/* arr.concat_map(lambda v: [1,2]) */

		suite.T().Log("About to run line #190: arr.ConcatMap(func(v r.Term) interface{} { return []interface{}{1, 2}})")

		runAndAssert(suite.Suite, expected_, arr.ConcatMap(func(v r.Term) interface{} { return []interface{}{1, 2} }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #190")
	}

	{
		// transform/array.yaml line #194
		/* [{'v':1}, {'v2':2}, {'v':2}, {'v2':3}, {'v':3}, {'v2':4}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"v": 1}, map[interface{}]interface{}{"v2": 2}, map[interface{}]interface{}{"v": 2}, map[interface{}]interface{}{"v2": 3}, map[interface{}]interface{}{"v": 3}, map[interface{}]interface{}{"v2": 4}}
		/* arr.concat_map(lambda v: [{'v':v}, {'v2':v + 1}]) */

		suite.T().Log("About to run line #194: arr.ConcatMap(func(v r.Term) interface{} { return []interface{}{map[interface{}]interface{}{'v': v, }, map[interface{}]interface{}{'v2': r.Add(v, 1), }}})")

		runAndAssert(suite.Suite, expected_, arr.ConcatMap(func(v r.Term) interface{} {
			return []interface{}{map[interface{}]interface{}{"v": v}, map[interface{}]interface{}{"v2": r.Add(v, 1)}}
		}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #194")
	}

	{
		// transform/array.yaml line #201
		/* [{'a':1, 'b':'a'}, {'a':2, 'b':'b'}, {'a':3, 'b':'c'}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"a": 1, "b": "a"}, map[interface{}]interface{}{"a": 2, "b": "b"}, map[interface{}]interface{}{"a": 3, "b": "c"}}
		/* objArr.order_by('b') */

		suite.T().Log("About to run line #201: objArr.OrderBy('b')")

		runAndAssert(suite.Suite, expected_, objArr.OrderBy("b"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #201")
	}

	{
		// transform/array.yaml line #205
		/* [{'a':3, 'b':'c'}, {'a':2, 'b':'b'}, {'a':1, 'b':'a'}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"a": 3, "b": "c"}, map[interface{}]interface{}{"a": 2, "b": "b"}, map[interface{}]interface{}{"a": 1, "b": "a"}}
		/* objArr.order_by(r.desc('b')) */

		suite.T().Log("About to run line #205: objArr.OrderBy(r.Desc('b'))")

		runAndAssert(suite.Suite, expected_, objArr.OrderBy(r.Desc("b")), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #205")
	}

	{
		// transform/array.yaml line #208
		/* [{'-a':1},{'-a':2}] */
		var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"-a": 1}, map[interface{}]interface{}{"-a": 2}}
		/* r.expr([{'-a':1},{'-a':2}]).order_by('-a') */

		suite.T().Log("About to run line #208: r.Expr([]interface{}{map[interface{}]interface{}{'-a': 1, }, map[interface{}]interface{}{'-a': 2, }}).OrderBy('-a')")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{map[interface{}]interface{}{"-a": 1}, map[interface{}]interface{}{"-a": 2}}).OrderBy("-a"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #208")
	}

	{
		// transform/array.yaml line #216
		/* [1,2,3,4] */
		var expected_ []interface{} = []interface{}{1, 2, 3, 4}
		/* r.expr([1,1,2,2,2,3,4]).distinct() */

		suite.T().Log("About to run line #216: r.Expr([]interface{}{1, 1, 2, 2, 2, 3, 4}).Distinct()")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 1, 2, 2, 2, 3, 4}).Distinct(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #216")
	}

	{
		// transform/array.yaml line #223
		/* 3 */
		var expected_ int = 3
		/* objArr.count() */

		suite.T().Log("About to run line #223: objArr.Count()")

		runAndAssert(suite.Suite, expected_, objArr.Count(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #223")
	}

	{
		// transform/array.yaml line #228
		/* [1, 2, 3, {'a':1, 'b':'a'}, {'a':2, 'b':'b'}, {'a':3, 'b':'c'}] */
		var expected_ []interface{} = []interface{}{1, 2, 3, map[interface{}]interface{}{"a": 1, "b": "a"}, map[interface{}]interface{}{"a": 2, "b": "b"}, map[interface{}]interface{}{"a": 3, "b": "c"}}
		/* arr.union(objArr) */

		suite.T().Log("About to run line #228: arr.Union(objArr)")

		runAndAssert(suite.Suite, expected_, arr.Union(objArr), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #228")
	}

	{
		// transform/array.yaml line #234
		/* 2 */
		var expected_ int = 2
		/* arr[1] */

		suite.T().Log("About to run line #234: arr.AtIndex(1)")

		runAndAssert(suite.Suite, expected_, arr.AtIndex(1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #234")
	}

	{
		// transform/array.yaml line #235
		/* 2 */
		var expected_ int = 2
		/* arr.nth(1) */

		suite.T().Log("About to run line #235: arr.Nth(1)")

		runAndAssert(suite.Suite, expected_, arr.Nth(1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #235")
	}

	{
		// transform/array.yaml line #238
		/* 1 */
		var expected_ int = 1
		/* arr[0] */

		suite.T().Log("About to run line #238: arr.AtIndex(0)")

		runAndAssert(suite.Suite, expected_, arr.AtIndex(0), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #238")
	}

	{
		// transform/array.yaml line #245
		/* true */
		var expected_ bool = true
		/* r.expr([]).is_empty() */

		suite.T().Log("About to run line #245: r.Expr([]interface{}{}).IsEmpty()")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{}).IsEmpty(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #245")
	}

	{
		// transform/array.yaml line #247
		/* false */
		var expected_ bool = false
		/* arr.is_empty() */

		suite.T().Log("About to run line #247: arr.IsEmpty()")

		runAndAssert(suite.Suite, expected_, arr.IsEmpty(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #247")
	}

	{
		// transform/array.yaml line #251
		/* true */
		var expected_ bool = true
		/* arr.contains(2) */

		suite.T().Log("About to run line #251: arr.Contains(2)")

		runAndAssert(suite.Suite, expected_, arr.Contains(2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #251")
	}

	{
		// transform/array.yaml line #253
		/* true */
		var expected_ bool = true
		/* arr.contains(2, 3) */

		suite.T().Log("About to run line #253: arr.Contains(2, 3)")

		runAndAssert(suite.Suite, expected_, arr.Contains(2, 3), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #253")
	}

	{
		// transform/array.yaml line #255
		/* false */
		var expected_ bool = false
		/* arr.contains(4) */

		suite.T().Log("About to run line #255: arr.Contains(4)")

		runAndAssert(suite.Suite, expected_, arr.Contains(4), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #255")
	}

	{
		// transform/array.yaml line #257
		/* false */
		var expected_ bool = false
		/* arr.contains(2, 4) */

		suite.T().Log("About to run line #257: arr.Contains(2, 4)")

		runAndAssert(suite.Suite, expected_, arr.Contains(2, 4), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #257")
	}

	{
		// transform/array.yaml line #259
		/* false */
		var expected_ bool = false
		/* arr.contains(2, 2) */

		suite.T().Log("About to run line #259: arr.Contains(2, 2)")

		runAndAssert(suite.Suite, expected_, arr.Contains(2, 2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #259")
	}

	{
		// transform/array.yaml line #261
		/* true */
		var expected_ bool = true
		/* arr.union(arr).contains(2, 2) */

		suite.T().Log("About to run line #261: arr.Union(arr).Contains(2, 2)")

		runAndAssert(suite.Suite, expected_, arr.Union(arr).Contains(2, 2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #261")
	}

	{
		// transform/array.yaml line #265
		/* true */
		var expected_ bool = true
		/* arr.contains(lambda x:x == 2) */

		suite.T().Log("About to run line #265: arr.Contains(func(x r.Term) interface{} { return r.Eq(x, 2)})")

		runAndAssert(suite.Suite, expected_, arr.Contains(func(x r.Term) interface{} { return r.Eq(x, 2) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #265")
	}

	{
		// transform/array.yaml line #269
		/* true */
		var expected_ bool = true
		/* arr.contains(lambda x:x == 2, lambda x:x==3) */

		suite.T().Log("About to run line #269: arr.Contains(func(x r.Term) interface{} { return r.Eq(x, 2)}, func(x r.Term) interface{} { return r.Eq(x, 3)})")

		runAndAssert(suite.Suite, expected_, arr.Contains(func(x r.Term) interface{} { return r.Eq(x, 2) }, func(x r.Term) interface{} { return r.Eq(x, 3) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #269")
	}

	{
		// transform/array.yaml line #273
		/* false */
		var expected_ bool = false
		/* arr.contains(lambda x:x == 4) */

		suite.T().Log("About to run line #273: arr.Contains(func(x r.Term) interface{} { return r.Eq(x, 4)})")

		runAndAssert(suite.Suite, expected_, arr.Contains(func(x r.Term) interface{} { return r.Eq(x, 4) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #273")
	}

	{
		// transform/array.yaml line #277
		/* false */
		var expected_ bool = false
		/* arr.contains(lambda x:x == 2, lambda x:x==4) */

		suite.T().Log("About to run line #277: arr.Contains(func(x r.Term) interface{} { return r.Eq(x, 2)}, func(x r.Term) interface{} { return r.Eq(x, 4)})")

		runAndAssert(suite.Suite, expected_, arr.Contains(func(x r.Term) interface{} { return r.Eq(x, 2) }, func(x r.Term) interface{} { return r.Eq(x, 4) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #277")
	}

	{
		// transform/array.yaml line #281
		/* false */
		var expected_ bool = false
		/* arr.contains(lambda x:x == 2, lambda x:x==2) */

		suite.T().Log("About to run line #281: arr.Contains(func(x r.Term) interface{} { return r.Eq(x, 2)}, func(x r.Term) interface{} { return r.Eq(x, 2)})")

		runAndAssert(suite.Suite, expected_, arr.Contains(func(x r.Term) interface{} { return r.Eq(x, 2) }, func(x r.Term) interface{} { return r.Eq(x, 2) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #281")
	}

	{
		// transform/array.yaml line #285
		/* true */
		var expected_ bool = true
		/* arr.union(arr).contains(lambda x:x == 2, lambda x:x==2) */

		suite.T().Log("About to run line #285: arr.Union(arr).Contains(func(x r.Term) interface{} { return r.Eq(x, 2)}, func(x r.Term) interface{} { return r.Eq(x, 2)})")

		runAndAssert(suite.Suite, expected_, arr.Union(arr).Contains(func(x r.Term) interface{} { return r.Eq(x, 2) }, func(x r.Term) interface{} { return r.Eq(x, 2) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #285")
	}

	{
		// transform/array.yaml line #290
		/* [1, 3] */
		var expected_ []interface{} = []interface{}{1, 3}
		/* r.expr([{'a':1},{'b':2},{'a':3,'c':4}])['a'] */

		suite.T().Log("About to run line #290: r.Expr([]interface{}{map[interface{}]interface{}{'a': 1, }, map[interface{}]interface{}{'b': 2, }, map[interface{}]interface{}{'a': 3, 'c': 4, }}).AtIndex('a')")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{map[interface{}]interface{}{"a": 1}, map[interface{}]interface{}{"b": 2}, map[interface{}]interface{}{"a": 3, "c": 4}}).AtIndex("a"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #290")
	}

	{
		// transform/array.yaml line #293
		/* err("ReqlQueryLogicError", "Cannot perform bracket on a non-object non-sequence `\"a\"`.", []) */
		var expected_ Err = err("ReqlQueryLogicError", "Cannot perform bracket on a non-object non-sequence `\"a\"`.")
		/* r.expr([{'a':1},'a',{'b':2},{'a':3,'c':4}])['a'] */

		suite.T().Log("About to run line #293: r.Expr([]interface{}{map[interface{}]interface{}{'a': 1, }, 'a', map[interface{}]interface{}{'b': 2, }, map[interface{}]interface{}{'a': 3, 'c': 4, }}).AtIndex('a')")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{map[interface{}]interface{}{"a": 1}, "a", map[interface{}]interface{}{"b": 2}, map[interface{}]interface{}{"a": 3, "c": 4}}).AtIndex("a"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #293")
	}
}
コード例 #9
0
func (suite *DatumBinarySuite) TestCases() {
	suite.T().Log("Running DatumBinarySuite: Tests of converstion to and from the RQL binary type")

	// datum/binary.yaml line #8
	// s = b''
	suite.T().Log("Possibly executing: var s []byte = []byte{}")

	s := []byte{}
	_ = s // Prevent any noused variable errors

	{
		// datum/binary.yaml line #10
		/* s */
		var expected_ []byte = s
		/* r.binary(s) */

		suite.T().Log("About to run line #10: r.Binary(s)")

		runAndAssert(suite.Suite, expected_, r.Binary(s), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #10")
	}

	{
		// datum/binary.yaml line #12
		/* 0 */
		var expected_ int = 0
		/* r.binary(s).count() */

		suite.T().Log("About to run line #12: r.Binary(s).Count()")

		runAndAssert(suite.Suite, expected_, r.Binary(s).Count(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #12")
	}

	// datum/binary.yaml line #17
	// s = b'\x00'
	suite.T().Log("Possibly executing: var s []byte = []byte{0}")

	s = []byte{0}

	{
		// datum/binary.yaml line #19
		/* s */
		var expected_ []byte = s
		/* r.binary(s) */

		suite.T().Log("About to run line #19: r.Binary(s)")

		runAndAssert(suite.Suite, expected_, r.Binary(s), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #19")
	}

	{
		// datum/binary.yaml line #21
		/* 1 */
		var expected_ int = 1
		/* r.binary(s).count() */

		suite.T().Log("About to run line #21: r.Binary(s).Count()")

		runAndAssert(suite.Suite, expected_, r.Binary(s).Count(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #21")
	}

	// datum/binary.yaml line #26
	// s = b'\x00\x42'
	suite.T().Log("Possibly executing: var s []byte = []byte{0,66}")

	s = []byte{0, 66}

	{
		// datum/binary.yaml line #28
		/* s */
		var expected_ []byte = s
		/* r.binary(s) */

		suite.T().Log("About to run line #28: r.Binary(s)")

		runAndAssert(suite.Suite, expected_, r.Binary(s), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #28")
	}

	{
		// datum/binary.yaml line #30
		/* 2 */
		var expected_ int = 2
		/* r.binary(s).count() */

		suite.T().Log("About to run line #30: r.Binary(s).Count()")

		runAndAssert(suite.Suite, expected_, r.Binary(s).Count(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #30")
	}

	// datum/binary.yaml line #35
	// s = b'\x00\xfe\x7a'
	suite.T().Log("Possibly executing: var s []byte = []byte{0,254,122}")

	s = []byte{0, 254, 122}

	{
		// datum/binary.yaml line #37
		/* s */
		var expected_ []byte = s
		/* r.binary(s) */

		suite.T().Log("About to run line #37: r.Binary(s)")

		runAndAssert(suite.Suite, expected_, r.Binary(s), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #37")
	}

	{
		// datum/binary.yaml line #39
		/* 3 */
		var expected_ int = 3
		/* r.binary(s).count() */

		suite.T().Log("About to run line #39: r.Binary(s).Count()")

		runAndAssert(suite.Suite, expected_, r.Binary(s).Count(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #39")
	}

	// datum/binary.yaml line #44
	// s = b'\xed\xfe\x00\xba'
	suite.T().Log("Possibly executing: var s []byte = []byte{237,254,0,186}")

	s = []byte{237, 254, 0, 186}

	{
		// datum/binary.yaml line #46
		/* s */
		var expected_ []byte = s
		/* r.binary(s) */

		suite.T().Log("About to run line #46: r.Binary(s)")

		runAndAssert(suite.Suite, expected_, r.Binary(s), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #46")
	}

	{
		// datum/binary.yaml line #48
		/* 4 */
		var expected_ int = 4
		/* r.binary(s).count() */

		suite.T().Log("About to run line #48: r.Binary(s).Count()")

		runAndAssert(suite.Suite, expected_, r.Binary(s).Count(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #48")
	}

	// datum/binary.yaml line #53
	// s = b'\x50\xf9\x00\x77\xf9'
	suite.T().Log("Possibly executing: var s []byte = []byte{80,249,0,119,249}")

	s = []byte{80, 249, 0, 119, 249}

	{
		// datum/binary.yaml line #55
		/* s */
		var expected_ []byte = s
		/* r.binary(s) */

		suite.T().Log("About to run line #55: r.Binary(s)")

		runAndAssert(suite.Suite, expected_, r.Binary(s), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #55")
	}

	{
		// datum/binary.yaml line #57
		/* 5 */
		var expected_ int = 5
		/* r.binary(s).count() */

		suite.T().Log("About to run line #57: r.Binary(s).Count()")

		runAndAssert(suite.Suite, expected_, r.Binary(s).Count(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #57")
	}

	// datum/binary.yaml line #62
	// s = b'\x2f\xe3\xb5\x57\x00\x92'
	suite.T().Log("Possibly executing: var s []byte = []byte{47,227,181,87,0,146}")

	s = []byte{47, 227, 181, 87, 0, 146}

	{
		// datum/binary.yaml line #64
		/* s */
		var expected_ []byte = s
		/* r.binary(s) */

		suite.T().Log("About to run line #64: r.Binary(s)")

		runAndAssert(suite.Suite, expected_, r.Binary(s), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #64")
	}

	{
		// datum/binary.yaml line #66
		/* 6 */
		var expected_ int = 6
		/* r.binary(s).count() */

		suite.T().Log("About to run line #66: r.Binary(s).Count()")

		runAndAssert(suite.Suite, expected_, r.Binary(s).Count(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #66")
	}

	// datum/binary.yaml line #71
	// s = b'\xa9\x43\x54\xe9\x00\xf8\xfb'
	suite.T().Log("Possibly executing: var s []byte = []byte{169,67,84,233,0,248,251}")

	s = []byte{169, 67, 84, 233, 0, 248, 251}

	{
		// datum/binary.yaml line #73
		/* s */
		var expected_ []byte = s
		/* r.binary(s) */

		suite.T().Log("About to run line #73: r.Binary(s)")

		runAndAssert(suite.Suite, expected_, r.Binary(s), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #73")
	}

	{
		// datum/binary.yaml line #75
		/* 7 */
		var expected_ int = 7
		/* r.binary(s).count() */

		suite.T().Log("About to run line #75: r.Binary(s).Count()")

		runAndAssert(suite.Suite, expected_, r.Binary(s).Count(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #75")
	}

	// datum/binary.yaml line #80
	// s = b'\x57\xbb\xe5\x82\x8b\xd3\x00\xf9'
	suite.T().Log("Possibly executing: var s []byte = []byte{87,187,229,130,139,211,0,249}")

	s = []byte{87, 187, 229, 130, 139, 211, 0, 249}

	{
		// datum/binary.yaml line #82
		/* s */
		var expected_ []byte = s
		/* r.binary(s) */

		suite.T().Log("About to run line #82: r.Binary(s)")

		runAndAssert(suite.Suite, expected_, r.Binary(s), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #82")
	}

	{
		// datum/binary.yaml line #84
		/* 8 */
		var expected_ int = 8
		/* r.binary(s).count() */

		suite.T().Log("About to run line #84: r.Binary(s).Count()")

		runAndAssert(suite.Suite, expected_, r.Binary(s).Count(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #84")
	}

	// datum/binary.yaml line #89
	// s = b'\x44\x1b\x3e\x00\x13\x19\x29\x2a\xbf'
	suite.T().Log("Possibly executing: var s []byte = []byte{68,27,62,0,19,25,41,42,191}")

	s = []byte{68, 27, 62, 0, 19, 25, 41, 42, 191}

	{
		// datum/binary.yaml line #91
		/* s */
		var expected_ []byte = s
		/* r.binary(s) */

		suite.T().Log("About to run line #91: r.Binary(s)")

		runAndAssert(suite.Suite, expected_, r.Binary(s), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #91")
	}

	{
		// datum/binary.yaml line #93
		/* 9 */
		var expected_ int = 9
		/* r.binary(s).count() */

		suite.T().Log("About to run line #93: r.Binary(s).Count()")

		runAndAssert(suite.Suite, expected_, r.Binary(s).Count(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #93")
	}

	// datum/binary.yaml line #98
	// s = b'\x8a\x1d\x09\x00\x5d\x60\x6b\x2e\x70\xd9'
	suite.T().Log("Possibly executing: var s []byte = []byte{138,29,9,0,93,96,107,46,112,217}")

	s = []byte{138, 29, 9, 0, 93, 96, 107, 46, 112, 217}

	{
		// datum/binary.yaml line #100
		/* s */
		var expected_ []byte = s
		/* r.binary(s) */

		suite.T().Log("About to run line #100: r.Binary(s)")

		runAndAssert(suite.Suite, expected_, r.Binary(s), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #100")
	}

	{
		// datum/binary.yaml line #102
		/* 10 */
		var expected_ int = 10
		/* r.binary(s).count() */

		suite.T().Log("About to run line #102: r.Binary(s).Count()")

		runAndAssert(suite.Suite, expected_, r.Binary(s).Count(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #102")
	}

	// datum/binary.yaml line #107
	// s = b'\x00\xaf\x47\x4b\x38\x99\x14\x8d\x8f\x10\x51'
	suite.T().Log("Possibly executing: var s []byte = []byte{0,175,71,75,56,153,20,141,143,16,81}")

	s = []byte{0, 175, 71, 75, 56, 153, 20, 141, 143, 16, 81}

	{
		// datum/binary.yaml line #109
		/* s */
		var expected_ []byte = s
		/* r.binary(s) */

		suite.T().Log("About to run line #109: r.Binary(s)")

		runAndAssert(suite.Suite, expected_, r.Binary(s), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #109")
	}

	{
		// datum/binary.yaml line #111
		/* 11 */
		var expected_ int = 11
		/* r.binary(s).count() */

		suite.T().Log("About to run line #111: r.Binary(s).Count()")

		runAndAssert(suite.Suite, expected_, r.Binary(s).Count(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #111")
	}

	// datum/binary.yaml line #116
	// s = b'\x45\x39\x00\xf7\xc2\x37\xfd\xe0\x38\x82\x40\xa9'
	suite.T().Log("Possibly executing: var s []byte = []byte{69,57,0,247,194,55,253,224,56,130,64,169}")

	s = []byte{69, 57, 0, 247, 194, 55, 253, 224, 56, 130, 64, 169}

	{
		// datum/binary.yaml line #118
		/* s */
		var expected_ []byte = s
		/* r.binary(s) */

		suite.T().Log("About to run line #118: r.Binary(s)")

		runAndAssert(suite.Suite, expected_, r.Binary(s), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #118")
	}

	{
		// datum/binary.yaml line #120
		/* 12 */
		var expected_ int = 12
		/* r.binary(s).count() */

		suite.T().Log("About to run line #120: r.Binary(s).Count()")

		runAndAssert(suite.Suite, expected_, r.Binary(s).Count(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #120")
	}

	// datum/binary.yaml line #128
	// a = b'\x00'
	suite.T().Log("Possibly executing: var a []byte = []byte{0}")

	a := []byte{0}
	_ = a // Prevent any noused variable errors

	// datum/binary.yaml line #132
	// b = b'\x00\x01'
	suite.T().Log("Possibly executing: var b []byte = []byte{0,1}")

	b := []byte{0, 1}
	_ = b // Prevent any noused variable errors

	// datum/binary.yaml line #136
	// c = b'\x01'
	suite.T().Log("Possibly executing: var c []byte = []byte{1}")

	c := []byte{1}
	_ = c // Prevent any noused variable errors

	// datum/binary.yaml line #140
	// d = b'\x70\x22'
	suite.T().Log("Possibly executing: var d []byte = []byte{112,34}")

	d := []byte{112, 34}
	_ = d // Prevent any noused variable errors

	// datum/binary.yaml line #144
	// e = b'\x80'
	suite.T().Log("Possibly executing: var e []byte = []byte{128}")

	e := []byte{128}
	_ = e // Prevent any noused variable errors

	// datum/binary.yaml line #148
	// f = b'\xFE'
	suite.T().Log("Possibly executing: var f []byte = []byte{254}")

	f := []byte{254}
	_ = f // Prevent any noused variable errors

	{
		// datum/binary.yaml line #151
		/* true */
		var expected_ bool = true
		/* r.binary(a).eq(r.binary(a)) */

		suite.T().Log("About to run line #151: r.Binary(a).Eq(r.Binary(a))")

		runAndAssert(suite.Suite, expected_, r.Binary(a).Eq(r.Binary(a)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #151")
	}

	{
		// datum/binary.yaml line #153
		/* true */
		var expected_ bool = true
		/* r.binary(a).le(r.binary(a)) */

		suite.T().Log("About to run line #153: r.Binary(a).Le(r.Binary(a))")

		runAndAssert(suite.Suite, expected_, r.Binary(a).Le(r.Binary(a)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #153")
	}

	{
		// datum/binary.yaml line #155
		/* true */
		var expected_ bool = true
		/* r.binary(a).ge(r.binary(a)) */

		suite.T().Log("About to run line #155: r.Binary(a).Ge(r.Binary(a))")

		runAndAssert(suite.Suite, expected_, r.Binary(a).Ge(r.Binary(a)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #155")
	}

	{
		// datum/binary.yaml line #157
		/* false */
		var expected_ bool = false
		/* r.binary(a).ne(r.binary(a)) */

		suite.T().Log("About to run line #157: r.Binary(a).Ne(r.Binary(a))")

		runAndAssert(suite.Suite, expected_, r.Binary(a).Ne(r.Binary(a)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #157")
	}

	{
		// datum/binary.yaml line #159
		/* false */
		var expected_ bool = false
		/* r.binary(a).lt(r.binary(a)) */

		suite.T().Log("About to run line #159: r.Binary(a).Lt(r.Binary(a))")

		runAndAssert(suite.Suite, expected_, r.Binary(a).Lt(r.Binary(a)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #159")
	}

	{
		// datum/binary.yaml line #161
		/* false */
		var expected_ bool = false
		/* r.binary(a).gt(r.binary(a)) */

		suite.T().Log("About to run line #161: r.Binary(a).Gt(r.Binary(a))")

		runAndAssert(suite.Suite, expected_, r.Binary(a).Gt(r.Binary(a)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #161")
	}

	{
		// datum/binary.yaml line #165
		/* true */
		var expected_ bool = true
		/* r.binary(a).ne(r.binary(b)) */

		suite.T().Log("About to run line #165: r.Binary(a).Ne(r.Binary(b))")

		runAndAssert(suite.Suite, expected_, r.Binary(a).Ne(r.Binary(b)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #165")
	}

	{
		// datum/binary.yaml line #167
		/* true */
		var expected_ bool = true
		/* r.binary(a).lt(r.binary(b)) */

		suite.T().Log("About to run line #167: r.Binary(a).Lt(r.Binary(b))")

		runAndAssert(suite.Suite, expected_, r.Binary(a).Lt(r.Binary(b)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #167")
	}

	{
		// datum/binary.yaml line #169
		/* true */
		var expected_ bool = true
		/* r.binary(a).le(r.binary(b)) */

		suite.T().Log("About to run line #169: r.Binary(a).Le(r.Binary(b))")

		runAndAssert(suite.Suite, expected_, r.Binary(a).Le(r.Binary(b)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #169")
	}

	{
		// datum/binary.yaml line #171
		/* false */
		var expected_ bool = false
		/* r.binary(a).ge(r.binary(b)) */

		suite.T().Log("About to run line #171: r.Binary(a).Ge(r.Binary(b))")

		runAndAssert(suite.Suite, expected_, r.Binary(a).Ge(r.Binary(b)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #171")
	}

	{
		// datum/binary.yaml line #173
		/* false */
		var expected_ bool = false
		/* r.binary(a).gt(r.binary(b)) */

		suite.T().Log("About to run line #173: r.Binary(a).Gt(r.Binary(b))")

		runAndAssert(suite.Suite, expected_, r.Binary(a).Gt(r.Binary(b)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #173")
	}

	{
		// datum/binary.yaml line #175
		/* false */
		var expected_ bool = false
		/* r.binary(a).eq(r.binary(b)) */

		suite.T().Log("About to run line #175: r.Binary(a).Eq(r.Binary(b))")

		runAndAssert(suite.Suite, expected_, r.Binary(a).Eq(r.Binary(b)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #175")
	}

	{
		// datum/binary.yaml line #179
		/* true */
		var expected_ bool = true
		/* r.binary(b).ne(r.binary(c)) */

		suite.T().Log("About to run line #179: r.Binary(b).Ne(r.Binary(c))")

		runAndAssert(suite.Suite, expected_, r.Binary(b).Ne(r.Binary(c)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #179")
	}

	{
		// datum/binary.yaml line #181
		/* true */
		var expected_ bool = true
		/* r.binary(b).lt(r.binary(c)) */

		suite.T().Log("About to run line #181: r.Binary(b).Lt(r.Binary(c))")

		runAndAssert(suite.Suite, expected_, r.Binary(b).Lt(r.Binary(c)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #181")
	}

	{
		// datum/binary.yaml line #183
		/* true */
		var expected_ bool = true
		/* r.binary(b).le(r.binary(c)) */

		suite.T().Log("About to run line #183: r.Binary(b).Le(r.Binary(c))")

		runAndAssert(suite.Suite, expected_, r.Binary(b).Le(r.Binary(c)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #183")
	}

	{
		// datum/binary.yaml line #185
		/* false */
		var expected_ bool = false
		/* r.binary(b).ge(r.binary(c)) */

		suite.T().Log("About to run line #185: r.Binary(b).Ge(r.Binary(c))")

		runAndAssert(suite.Suite, expected_, r.Binary(b).Ge(r.Binary(c)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #185")
	}

	{
		// datum/binary.yaml line #187
		/* false */
		var expected_ bool = false
		/* r.binary(b).gt(r.binary(c)) */

		suite.T().Log("About to run line #187: r.Binary(b).Gt(r.Binary(c))")

		runAndAssert(suite.Suite, expected_, r.Binary(b).Gt(r.Binary(c)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #187")
	}

	{
		// datum/binary.yaml line #189
		/* false */
		var expected_ bool = false
		/* r.binary(b).eq(r.binary(c)) */

		suite.T().Log("About to run line #189: r.Binary(b).Eq(r.Binary(c))")

		runAndAssert(suite.Suite, expected_, r.Binary(b).Eq(r.Binary(c)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #189")
	}

	{
		// datum/binary.yaml line #193
		/* true */
		var expected_ bool = true
		/* r.binary(c).ne(r.binary(d)) */

		suite.T().Log("About to run line #193: r.Binary(c).Ne(r.Binary(d))")

		runAndAssert(suite.Suite, expected_, r.Binary(c).Ne(r.Binary(d)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #193")
	}

	{
		// datum/binary.yaml line #195
		/* true */
		var expected_ bool = true
		/* r.binary(c).lt(r.binary(d)) */

		suite.T().Log("About to run line #195: r.Binary(c).Lt(r.Binary(d))")

		runAndAssert(suite.Suite, expected_, r.Binary(c).Lt(r.Binary(d)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #195")
	}

	{
		// datum/binary.yaml line #197
		/* true */
		var expected_ bool = true
		/* r.binary(c).le(r.binary(d)) */

		suite.T().Log("About to run line #197: r.Binary(c).Le(r.Binary(d))")

		runAndAssert(suite.Suite, expected_, r.Binary(c).Le(r.Binary(d)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #197")
	}

	{
		// datum/binary.yaml line #199
		/* false */
		var expected_ bool = false
		/* r.binary(c).ge(r.binary(d)) */

		suite.T().Log("About to run line #199: r.Binary(c).Ge(r.Binary(d))")

		runAndAssert(suite.Suite, expected_, r.Binary(c).Ge(r.Binary(d)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #199")
	}

	{
		// datum/binary.yaml line #201
		/* false */
		var expected_ bool = false
		/* r.binary(c).gt(r.binary(d)) */

		suite.T().Log("About to run line #201: r.Binary(c).Gt(r.Binary(d))")

		runAndAssert(suite.Suite, expected_, r.Binary(c).Gt(r.Binary(d)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #201")
	}

	{
		// datum/binary.yaml line #203
		/* false */
		var expected_ bool = false
		/* r.binary(c).eq(r.binary(d)) */

		suite.T().Log("About to run line #203: r.Binary(c).Eq(r.Binary(d))")

		runAndAssert(suite.Suite, expected_, r.Binary(c).Eq(r.Binary(d)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #203")
	}

	{
		// datum/binary.yaml line #207
		/* true */
		var expected_ bool = true
		/* r.binary(d).ne(r.binary(e)) */

		suite.T().Log("About to run line #207: r.Binary(d).Ne(r.Binary(e))")

		runAndAssert(suite.Suite, expected_, r.Binary(d).Ne(r.Binary(e)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #207")
	}

	{
		// datum/binary.yaml line #209
		/* true */
		var expected_ bool = true
		/* r.binary(d).lt(r.binary(e)) */

		suite.T().Log("About to run line #209: r.Binary(d).Lt(r.Binary(e))")

		runAndAssert(suite.Suite, expected_, r.Binary(d).Lt(r.Binary(e)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #209")
	}

	{
		// datum/binary.yaml line #211
		/* true */
		var expected_ bool = true
		/* r.binary(d).le(r.binary(e)) */

		suite.T().Log("About to run line #211: r.Binary(d).Le(r.Binary(e))")

		runAndAssert(suite.Suite, expected_, r.Binary(d).Le(r.Binary(e)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #211")
	}

	{
		// datum/binary.yaml line #213
		/* false */
		var expected_ bool = false
		/* r.binary(d).ge(r.binary(e)) */

		suite.T().Log("About to run line #213: r.Binary(d).Ge(r.Binary(e))")

		runAndAssert(suite.Suite, expected_, r.Binary(d).Ge(r.Binary(e)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #213")
	}

	{
		// datum/binary.yaml line #215
		/* false */
		var expected_ bool = false
		/* r.binary(d).gt(r.binary(e)) */

		suite.T().Log("About to run line #215: r.Binary(d).Gt(r.Binary(e))")

		runAndAssert(suite.Suite, expected_, r.Binary(d).Gt(r.Binary(e)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #215")
	}

	{
		// datum/binary.yaml line #217
		/* false */
		var expected_ bool = false
		/* r.binary(d).eq(r.binary(e)) */

		suite.T().Log("About to run line #217: r.Binary(d).Eq(r.Binary(e))")

		runAndAssert(suite.Suite, expected_, r.Binary(d).Eq(r.Binary(e)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #217")
	}

	{
		// datum/binary.yaml line #221
		/* true */
		var expected_ bool = true
		/* r.binary(e).ne(r.binary(f)) */

		suite.T().Log("About to run line #221: r.Binary(e).Ne(r.Binary(f))")

		runAndAssert(suite.Suite, expected_, r.Binary(e).Ne(r.Binary(f)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #221")
	}

	{
		// datum/binary.yaml line #223
		/* true */
		var expected_ bool = true
		/* r.binary(e).lt(r.binary(f)) */

		suite.T().Log("About to run line #223: r.Binary(e).Lt(r.Binary(f))")

		runAndAssert(suite.Suite, expected_, r.Binary(e).Lt(r.Binary(f)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #223")
	}

	{
		// datum/binary.yaml line #225
		/* true */
		var expected_ bool = true
		/* r.binary(e).le(r.binary(f)) */

		suite.T().Log("About to run line #225: r.Binary(e).Le(r.Binary(f))")

		runAndAssert(suite.Suite, expected_, r.Binary(e).Le(r.Binary(f)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #225")
	}

	{
		// datum/binary.yaml line #227
		/* false */
		var expected_ bool = false
		/* r.binary(e).ge(r.binary(f)) */

		suite.T().Log("About to run line #227: r.Binary(e).Ge(r.Binary(f))")

		runAndAssert(suite.Suite, expected_, r.Binary(e).Ge(r.Binary(f)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #227")
	}

	{
		// datum/binary.yaml line #229
		/* false */
		var expected_ bool = false
		/* r.binary(e).gt(r.binary(f)) */

		suite.T().Log("About to run line #229: r.Binary(e).Gt(r.Binary(f))")

		runAndAssert(suite.Suite, expected_, r.Binary(e).Gt(r.Binary(f)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #229")
	}

	{
		// datum/binary.yaml line #231
		/* false */
		var expected_ bool = false
		/* r.binary(e).eq(r.binary(f)) */

		suite.T().Log("About to run line #231: r.Binary(e).Eq(r.Binary(f))")

		runAndAssert(suite.Suite, expected_, r.Binary(e).Eq(r.Binary(f)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #231")
	}

	{
		// datum/binary.yaml line #235
		/* true */
		var expected_ bool = true
		/* r.binary(f).eq(r.binary(f)) */

		suite.T().Log("About to run line #235: r.Binary(f).Eq(r.Binary(f))")

		runAndAssert(suite.Suite, expected_, r.Binary(f).Eq(r.Binary(f)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #235")
	}

	{
		// datum/binary.yaml line #237
		/* true */
		var expected_ bool = true
		/* r.binary(f).le(r.binary(f)) */

		suite.T().Log("About to run line #237: r.Binary(f).Le(r.Binary(f))")

		runAndAssert(suite.Suite, expected_, r.Binary(f).Le(r.Binary(f)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #237")
	}

	{
		// datum/binary.yaml line #239
		/* true */
		var expected_ bool = true
		/* r.binary(f).ge(r.binary(f)) */

		suite.T().Log("About to run line #239: r.Binary(f).Ge(r.Binary(f))")

		runAndAssert(suite.Suite, expected_, r.Binary(f).Ge(r.Binary(f)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #239")
	}

	{
		// datum/binary.yaml line #241
		/* false */
		var expected_ bool = false
		/* r.binary(f).ne(r.binary(f)) */

		suite.T().Log("About to run line #241: r.Binary(f).Ne(r.Binary(f))")

		runAndAssert(suite.Suite, expected_, r.Binary(f).Ne(r.Binary(f)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #241")
	}

	{
		// datum/binary.yaml line #243
		/* false */
		var expected_ bool = false
		/* r.binary(f).lt(r.binary(f)) */

		suite.T().Log("About to run line #243: r.Binary(f).Lt(r.Binary(f))")

		runAndAssert(suite.Suite, expected_, r.Binary(f).Lt(r.Binary(f)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #243")
	}

	{
		// datum/binary.yaml line #245
		/* false */
		var expected_ bool = false
		/* r.binary(f).gt(r.binary(f)) */

		suite.T().Log("About to run line #245: r.Binary(f).Gt(r.Binary(f))")

		runAndAssert(suite.Suite, expected_, r.Binary(f).Gt(r.Binary(f)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #245")
	}

	{
		// datum/binary.yaml line #269
		/* 'foo' */
		var expected_ string = "foo"
		/* r.binary(b'foo').coerce_to('string') */

		suite.T().Log("About to run line #269: r.Binary([]byte{102,111,111}).CoerceTo('string')")

		runAndAssert(suite.Suite, expected_, r.Binary([]byte{102, 111, 111}).CoerceTo("string"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #269")
	}

	{
		// datum/binary.yaml line #284
		/* b'foo' */
		var expected_ []byte = []byte{102, 111, 111}
		/* r.expr('foo').coerce_to('binary') */

		suite.T().Log("About to run line #284: r.Expr('foo').CoerceTo('binary')")

		runAndAssert(suite.Suite, expected_, r.Expr("foo").CoerceTo("binary"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #284")
	}

	{
		// datum/binary.yaml line #287
		/* True */
		var expected_ bool = true
		/* r.binary(a).coerce_to('bool') */

		suite.T().Log("About to run line #287: r.Binary(a).CoerceTo('bool')")

		runAndAssert(suite.Suite, expected_, r.Binary(a).CoerceTo("bool"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #287")
	}

	{
		// datum/binary.yaml line #290
		/* b'foo' */
		var expected_ []byte = []byte{102, 111, 111}
		/* r.binary(b'foo').coerce_to('binary') */

		suite.T().Log("About to run line #290: r.Binary([]byte{102,111,111}).CoerceTo('binary')")

		runAndAssert(suite.Suite, expected_, r.Binary([]byte{102, 111, 111}).CoerceTo("binary"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #290")
	}

	{
		// datum/binary.yaml line #294
		/* b'ef' */
		var expected_ []byte = []byte{101, 102}
		/* r.binary(b'abcdefg').slice(-3,-1) */

		suite.T().Log("About to run line #294: r.Binary([]byte{97,98,99,100,101,102,103}).Slice(-3, -1)")

		runAndAssert(suite.Suite, expected_, r.Binary([]byte{97, 98, 99, 100, 101, 102, 103}).Slice(-3, -1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #294")
	}

	{
		// datum/binary.yaml line #296
		/* b'ab' */
		var expected_ []byte = []byte{97, 98}
		/* r.binary(b'abcdefg').slice(0, 2) */

		suite.T().Log("About to run line #296: r.Binary([]byte{97,98,99,100,101,102,103}).Slice(0, 2)")

		runAndAssert(suite.Suite, expected_, r.Binary([]byte{97, 98, 99, 100, 101, 102, 103}).Slice(0, 2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #296")
	}

	{
		// datum/binary.yaml line #298
		/* b'def' */
		var expected_ []byte = []byte{100, 101, 102}
		/* r.binary(b'abcdefg').slice(3, -1) */

		suite.T().Log("About to run line #298: r.Binary([]byte{97,98,99,100,101,102,103}).Slice(3, -1)")

		runAndAssert(suite.Suite, expected_, r.Binary([]byte{97, 98, 99, 100, 101, 102, 103}).Slice(3, -1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #298")
	}

	{
		// datum/binary.yaml line #300
		/* b'cde' */
		var expected_ []byte = []byte{99, 100, 101}
		/* r.binary(b'abcdefg').slice(-5, 5) */

		suite.T().Log("About to run line #300: r.Binary([]byte{97,98,99,100,101,102,103}).Slice(-5, 5)")

		runAndAssert(suite.Suite, expected_, r.Binary([]byte{97, 98, 99, 100, 101, 102, 103}).Slice(-5, 5), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #300")
	}

	{
		// datum/binary.yaml line #302
		/* b'ab' */
		var expected_ []byte = []byte{97, 98}
		/* r.binary(b'abcdefg').slice(-8, 2) */

		suite.T().Log("About to run line #302: r.Binary([]byte{97,98,99,100,101,102,103}).Slice(-8, 2)")

		runAndAssert(suite.Suite, expected_, r.Binary([]byte{97, 98, 99, 100, 101, 102, 103}).Slice(-8, 2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #302")
	}

	{
		// datum/binary.yaml line #304
		/* b'fg' */
		var expected_ []byte = []byte{102, 103}
		/* r.binary(b'abcdefg').slice(5, 7) */

		suite.T().Log("About to run line #304: r.Binary([]byte{97,98,99,100,101,102,103}).Slice(5, 7)")

		runAndAssert(suite.Suite, expected_, r.Binary([]byte{97, 98, 99, 100, 101, 102, 103}).Slice(5, 7), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #304")
	}

	{
		// datum/binary.yaml line #308
		/* b'ab' */
		var expected_ []byte = []byte{97, 98}
		/* r.binary(b'abcdefg').slice(-9, 2) */

		suite.T().Log("About to run line #308: r.Binary([]byte{97,98,99,100,101,102,103}).Slice(-9, 2)")

		runAndAssert(suite.Suite, expected_, r.Binary([]byte{97, 98, 99, 100, 101, 102, 103}).Slice(-9, 2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #308")
	}

	{
		// datum/binary.yaml line #312
		/* b'fg' */
		var expected_ []byte = []byte{102, 103}
		/* r.binary(b'abcdefg').slice(5, 9) */

		suite.T().Log("About to run line #312: r.Binary([]byte{97,98,99,100,101,102,103}).Slice(5, 9)")

		runAndAssert(suite.Suite, expected_, r.Binary([]byte{97, 98, 99, 100, 101, 102, 103}).Slice(5, 9), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #312")
	}

	{
		// datum/binary.yaml line #316
		/* b */
		var expected_ []byte = b
		/* r.binary(b) */

		suite.T().Log("About to run line #316: r.Binary(b)")

		runAndAssert(suite.Suite, expected_, r.Binary(b), suite.session, r.RunOpts{
			BinaryFormat:   "native",
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #316")
	}

	{
		// datum/binary.yaml line #320
		/* {'$reql_type$':'BINARY','data':'AAE='} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"$reql_type$": "BINARY", "data": "AAE="}
		/* r.binary(b) */

		suite.T().Log("About to run line #320: r.Binary(b)")

		runAndAssert(suite.Suite, expected_, r.Binary(b), suite.session, r.RunOpts{
			BinaryFormat:   "raw",
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #320")
	}

	{
		// datum/binary.yaml line #326
		/* b"data" */
		var expected_ []byte = []byte{100, 97, 116, 97}
		/* r.binary(r.expr("data")) */

		suite.T().Log("About to run line #326: r.Binary(r.Expr('data'))")

		runAndAssert(suite.Suite, expected_, r.Binary(r.Expr("data")), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #326")
	}

	{
		// datum/binary.yaml line #332
		/* err('ReqlQueryLogicError', 'Expected type STRING but found OBJECT.', []) */
		var expected_ Err = err("ReqlQueryLogicError", "Expected type STRING but found OBJECT.")
		/* r.binary(r.expr({})) */

		suite.T().Log("About to run line #332: r.Binary(r.Expr(map[interface{}]interface{}{}))")

		runAndAssert(suite.Suite, expected_, r.Binary(r.Expr(map[interface{}]interface{}{})), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #332")
	}

	{
		// datum/binary.yaml line #335
		/* err('ReqlQueryLogicError', 'Expected type STRING but found ARRAY.', []) */
		var expected_ Err = err("ReqlQueryLogicError", "Expected type STRING but found ARRAY.")
		/* r.binary(r.expr([])) */

		suite.T().Log("About to run line #335: r.Binary(r.Expr([]interface{}{}))")

		runAndAssert(suite.Suite, expected_, r.Binary(r.Expr([]interface{}{})), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #335")
	}

	{
		// datum/binary.yaml line #341
		/* err('ReqlQueryLogicError','Invalid binary pseudotype:'+' lacking `data` key.',[]) */
		var expected_ Err = err("ReqlQueryLogicError", "Invalid binary pseudotype:"+" lacking `data` key.")
		/* r.expr({'$reql_type$':'BINARY'}) */

		suite.T().Log("About to run line #341: r.Expr(map[interface{}]interface{}{'$reql_type$': 'BINARY', })")

		runAndAssert(suite.Suite, expected_, r.Expr(map[interface{}]interface{}{"$reql_type$": "BINARY"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #341")
	}

	{
		// datum/binary.yaml line #346
		/* err('ReqlQueryLogicError','Invalid base64 format, data found after padding character \'=\'.',[]) */
		var expected_ Err = err("ReqlQueryLogicError", "Invalid base64 format, data found after padding character '='.")
		/* r.expr({'$reql_type$':'BINARY','data':'ABCDEFGH==AA'}) */

		suite.T().Log("About to run line #346: r.Expr(map[interface{}]interface{}{'$reql_type$': 'BINARY', 'data': 'ABCDEFGH==AA', })")

		runAndAssert(suite.Suite, expected_, r.Expr(map[interface{}]interface{}{"$reql_type$": "BINARY", "data": "ABCDEFGH==AA"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #346")
	}

	{
		// datum/binary.yaml line #348
		/* err('ReqlQueryLogicError','Invalid base64 format, data found after padding character \'=\'.',[]) */
		var expected_ Err = err("ReqlQueryLogicError", "Invalid base64 format, data found after padding character '='.")
		/* r.expr({'$reql_type$':'BINARY','data':'ABCDEF==$'}) */

		suite.T().Log("About to run line #348: r.Expr(map[interface{}]interface{}{'$reql_type$': 'BINARY', 'data': 'ABCDEF==$', })")

		runAndAssert(suite.Suite, expected_, r.Expr(map[interface{}]interface{}{"$reql_type$": "BINARY", "data": "ABCDEF==$"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #348")
	}

	{
		// datum/binary.yaml line #350
		/* err('ReqlQueryLogicError','Invalid base64 character found:'+' \'^\'.',[]) */
		var expected_ Err = err("ReqlQueryLogicError", "Invalid base64 character found:"+" '^'.")
		/* r.expr({'$reql_type$':'BINARY','data':'A^CDEFGH'}) */

		suite.T().Log("About to run line #350: r.Expr(map[interface{}]interface{}{'$reql_type$': 'BINARY', 'data': 'A^CDEFGH', })")

		runAndAssert(suite.Suite, expected_, r.Expr(map[interface{}]interface{}{"$reql_type$": "BINARY", "data": "A^CDEFGH"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #350")
	}

	{
		// datum/binary.yaml line #352
		/* err('ReqlQueryLogicError','Invalid base64 length:'+' 1 character remaining, cannot decode a full byte.',[]) */
		var expected_ Err = err("ReqlQueryLogicError", "Invalid base64 length:"+" 1 character remaining, cannot decode a full byte.")
		/* r.expr({'$reql_type$':'BINARY','data':'ABCDE'}) */

		suite.T().Log("About to run line #352: r.Expr(map[interface{}]interface{}{'$reql_type$': 'BINARY', 'data': 'ABCDE', })")

		runAndAssert(suite.Suite, expected_, r.Expr(map[interface{}]interface{}{"$reql_type$": "BINARY", "data": "ABCDE"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #352")
	}

	{
		// datum/binary.yaml line #356
		/* err('ReqlQueryLogicError','Cannot coerce BINARY to ARRAY.',[]) */
		var expected_ Err = err("ReqlQueryLogicError", "Cannot coerce BINARY to ARRAY.")
		/* r.binary(a).coerce_to('array') */

		suite.T().Log("About to run line #356: r.Binary(a).CoerceTo('array')")

		runAndAssert(suite.Suite, expected_, r.Binary(a).CoerceTo("array"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #356")
	}

	{
		// datum/binary.yaml line #358
		/* err('ReqlQueryLogicError','Cannot coerce BINARY to OBJECT.',[]) */
		var expected_ Err = err("ReqlQueryLogicError", "Cannot coerce BINARY to OBJECT.")
		/* r.binary(a).coerce_to('object') */

		suite.T().Log("About to run line #358: r.Binary(a).CoerceTo('object')")

		runAndAssert(suite.Suite, expected_, r.Binary(a).CoerceTo("object"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #358")
	}

	{
		// datum/binary.yaml line #360
		/* err('ReqlQueryLogicError','Cannot coerce BINARY to NUMBER.',[]) */
		var expected_ Err = err("ReqlQueryLogicError", "Cannot coerce BINARY to NUMBER.")
		/* r.binary(a).coerce_to('number') */

		suite.T().Log("About to run line #360: r.Binary(a).CoerceTo('number')")

		runAndAssert(suite.Suite, expected_, r.Binary(a).CoerceTo("number"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #360")
	}

	{
		// datum/binary.yaml line #362
		/* err('ReqlQueryLogicError','Cannot coerce BINARY to NULL.',[]) */
		var expected_ Err = err("ReqlQueryLogicError", "Cannot coerce BINARY to NULL.")
		/* r.binary(a).coerce_to('nu'+'ll') */

		suite.T().Log("About to run line #362: r.Binary(a).CoerceTo(r.Add('nu', 'll'))")

		runAndAssert(suite.Suite, expected_, r.Binary(a).CoerceTo(r.Add("nu", "ll")), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #362")
	}
}
コード例 #10
0
func (suite *MathLogicAliasesSuite) TestCases() {
	suite.T().Log("Running MathLogicAliasesSuite: Test named aliases for math and logic operators")

	{
		// math_logic/aliases.yaml line #5
		/* 1 */
		var expected_ int = 1
		/* r.expr(0).add(1) */

		suite.T().Log("About to run line #5: r.Expr(0).Add(1)")

		runAndAssert(suite.Suite, expected_, r.Expr(0).Add(1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #5")
	}

	{
		// math_logic/aliases.yaml line #6
		/* 1 */
		var expected_ int = 1
		/* r.add(0, 1) */

		suite.T().Log("About to run line #6: r.Add(0, 1)")

		runAndAssert(suite.Suite, expected_, r.Add(0, 1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #6")
	}

	{
		// math_logic/aliases.yaml line #7
		/* 1 */
		var expected_ int = 1
		/* r.expr(2).sub(1) */

		suite.T().Log("About to run line #7: r.Expr(2).Sub(1)")

		runAndAssert(suite.Suite, expected_, r.Expr(2).Sub(1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #7")
	}

	{
		// math_logic/aliases.yaml line #8
		/* 1 */
		var expected_ int = 1
		/* r.sub(2, 1) */

		suite.T().Log("About to run line #8: r.Sub(2, 1)")

		runAndAssert(suite.Suite, expected_, r.Sub(2, 1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #8")
	}

	{
		// math_logic/aliases.yaml line #9
		/* 1 */
		var expected_ int = 1
		/* r.expr(2).div(2) */

		suite.T().Log("About to run line #9: r.Expr(2).Div(2)")

		runAndAssert(suite.Suite, expected_, r.Expr(2).Div(2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #9")
	}

	{
		// math_logic/aliases.yaml line #10
		/* 1 */
		var expected_ int = 1
		/* r.div(2, 2) */

		suite.T().Log("About to run line #10: r.Div(2, 2)")

		runAndAssert(suite.Suite, expected_, r.Div(2, 2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #10")
	}

	{
		// math_logic/aliases.yaml line #11
		/* 1 */
		var expected_ int = 1
		/* r.expr(1).mul(1) */

		suite.T().Log("About to run line #11: r.Expr(1).Mul(1)")

		runAndAssert(suite.Suite, expected_, r.Expr(1).Mul(1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #11")
	}

	{
		// math_logic/aliases.yaml line #12
		/* 1 */
		var expected_ int = 1
		/* r.mul(1, 1) */

		suite.T().Log("About to run line #12: r.Mul(1, 1)")

		runAndAssert(suite.Suite, expected_, r.Mul(1, 1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #12")
	}

	{
		// math_logic/aliases.yaml line #13
		/* 1 */
		var expected_ int = 1
		/* r.expr(1).mod(2) */

		suite.T().Log("About to run line #13: r.Expr(1).Mod(2)")

		runAndAssert(suite.Suite, expected_, r.Expr(1).Mod(2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #13")
	}

	{
		// math_logic/aliases.yaml line #14
		/* 1 */
		var expected_ int = 1
		/* r.mod(1, 2) */

		suite.T().Log("About to run line #14: r.Mod(1, 2)")

		runAndAssert(suite.Suite, expected_, r.Mod(1, 2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #14")
	}

	{
		// math_logic/aliases.yaml line #25
		/* True */
		var expected_ bool = true
		/* r.expr(True).and_(True) */

		suite.T().Log("About to run line #25: r.Expr(true).And(true)")

		runAndAssert(suite.Suite, expected_, r.Expr(true).And(true), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #25")
	}

	{
		// math_logic/aliases.yaml line #26
		/* True */
		var expected_ bool = true
		/* r.expr(True).or_(True) */

		suite.T().Log("About to run line #26: r.Expr(true).Or(true)")

		runAndAssert(suite.Suite, expected_, r.Expr(true).Or(true), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #26")
	}

	{
		// math_logic/aliases.yaml line #27
		/* True */
		var expected_ bool = true
		/* r.and_(True, True) */

		suite.T().Log("About to run line #27: r.And(true, true)")

		runAndAssert(suite.Suite, expected_, r.And(true, true), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #27")
	}

	{
		// math_logic/aliases.yaml line #28
		/* True */
		var expected_ bool = true
		/* r.or_(True, True) */

		suite.T().Log("About to run line #28: r.Or(true, true)")

		runAndAssert(suite.Suite, expected_, r.Or(true, true), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #28")
	}

	{
		// math_logic/aliases.yaml line #29
		/* True */
		var expected_ bool = true
		/* r.expr(False).not_() */

		suite.T().Log("About to run line #29: r.Expr(false).Not()")

		runAndAssert(suite.Suite, expected_, r.Expr(false).Not(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #29")
	}

	{
		// math_logic/aliases.yaml line #30
		/* True */
		var expected_ bool = true
		/* r.not_(False) */

		suite.T().Log("About to run line #30: r.Not(false)")

		runAndAssert(suite.Suite, expected_, r.Not(false), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #30")
	}

	{
		// math_logic/aliases.yaml line #34
		/* True */
		var expected_ bool = true
		/* r.expr(1).eq(1) */

		suite.T().Log("About to run line #34: r.Expr(1).Eq(1)")

		runAndAssert(suite.Suite, expected_, r.Expr(1).Eq(1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #34")
	}

	{
		// math_logic/aliases.yaml line #35
		/* True */
		var expected_ bool = true
		/* r.expr(1).ne(2) */

		suite.T().Log("About to run line #35: r.Expr(1).Ne(2)")

		runAndAssert(suite.Suite, expected_, r.Expr(1).Ne(2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #35")
	}

	{
		// math_logic/aliases.yaml line #36
		/* True */
		var expected_ bool = true
		/* r.expr(1).lt(2) */

		suite.T().Log("About to run line #36: r.Expr(1).Lt(2)")

		runAndAssert(suite.Suite, expected_, r.Expr(1).Lt(2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #36")
	}

	{
		// math_logic/aliases.yaml line #37
		/* True */
		var expected_ bool = true
		/* r.expr(1).gt(0) */

		suite.T().Log("About to run line #37: r.Expr(1).Gt(0)")

		runAndAssert(suite.Suite, expected_, r.Expr(1).Gt(0), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #37")
	}

	{
		// math_logic/aliases.yaml line #38
		/* True */
		var expected_ bool = true
		/* r.expr(1).le(1) */

		suite.T().Log("About to run line #38: r.Expr(1).Le(1)")

		runAndAssert(suite.Suite, expected_, r.Expr(1).Le(1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #38")
	}

	{
		// math_logic/aliases.yaml line #39
		/* True */
		var expected_ bool = true
		/* r.expr(1).ge(1) */

		suite.T().Log("About to run line #39: r.Expr(1).Ge(1)")

		runAndAssert(suite.Suite, expected_, r.Expr(1).Ge(1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #39")
	}

	{
		// math_logic/aliases.yaml line #40
		/* True */
		var expected_ bool = true
		/* r.eq(1, 1) */

		suite.T().Log("About to run line #40: r.Eq(1, 1)")

		runAndAssert(suite.Suite, expected_, r.Eq(1, 1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #40")
	}

	{
		// math_logic/aliases.yaml line #41
		/* True */
		var expected_ bool = true
		/* r.ne(1, 2) */

		suite.T().Log("About to run line #41: r.Ne(1, 2)")

		runAndAssert(suite.Suite, expected_, r.Ne(1, 2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #41")
	}

	{
		// math_logic/aliases.yaml line #42
		/* True */
		var expected_ bool = true
		/* r.lt(1, 2) */

		suite.T().Log("About to run line #42: r.Lt(1, 2)")

		runAndAssert(suite.Suite, expected_, r.Lt(1, 2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #42")
	}

	{
		// math_logic/aliases.yaml line #43
		/* True */
		var expected_ bool = true
		/* r.gt(1, 0) */

		suite.T().Log("About to run line #43: r.Gt(1, 0)")

		runAndAssert(suite.Suite, expected_, r.Gt(1, 0), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #43")
	}

	{
		// math_logic/aliases.yaml line #44
		/* True */
		var expected_ bool = true
		/* r.le(1, 1) */

		suite.T().Log("About to run line #44: r.Le(1, 1)")

		runAndAssert(suite.Suite, expected_, r.Le(1, 1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #44")
	}

	{
		// math_logic/aliases.yaml line #45
		/* True */
		var expected_ bool = true
		/* r.ge(1, 1) */

		suite.T().Log("About to run line #45: r.Ge(1, 1)")

		runAndAssert(suite.Suite, expected_, r.Ge(1, 1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #45")
	}
}
コード例 #11
0
func (suite *MetaCompositeSuite) TestCases() {
	suite.T().Log("Running MetaCompositeSuite: Tests meta operations in composite queries")

	{
		// meta/composite.py.yaml line #4
		/* ({'dbs_created':3,'config_changes':arrlen(3)}) */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"dbs_created": 3, "config_changes": arrlen(3)}
		/* r.expr([1,2,3]).for_each(r.db_create('db_' + r.row.coerce_to('string'))) */

		suite.T().Log("About to run line #4: r.Expr([]interface{}{1, 2, 3}).ForEach(r.DBCreate(r.Add('db_', r.Row.CoerceTo('string'))))")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(r.DBCreate(r.Add("db_", r.Row.CoerceTo("string")))), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #4")
	}

	{
		// meta/composite.py.yaml line #8
		/* partial({'tables_created':9}) */
		var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"tables_created": 9})
		/* r.db_list().set_difference(["rethinkdb", "test"]).for_each(lambda db_name:
		r.expr([1,2,3]).for_each(lambda i:
		r.db(db_name).table_create('tbl_' + i.coerce_to('string')))) */

		suite.T().Log("About to run line #8: r.DBList().SetDifference([]interface{}{'rethinkdb', 'test'}).ForEach(func(db_name r.Term) interface{} { return r.Expr([]interface{}{1, 2, 3}).ForEach(func(i r.Term) interface{} { return r.DB(db_name).TableCreate(r.Add('tbl_', i.CoerceTo('string')))})})")

		runAndAssert(suite.Suite, expected_, r.DBList().SetDifference([]interface{}{"rethinkdb", "test"}).ForEach(func(db_name r.Term) interface{} {
			return r.Expr([]interface{}{1, 2, 3}).ForEach(func(i r.Term) interface{} { return r.DB(db_name).TableCreate(r.Add("tbl_", i.CoerceTo("string"))) })
		}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #8")
	}

	{
		// meta/composite.py.yaml line #13
		/* partial({'dbs_dropped':3,'tables_dropped':9}) */
		var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"dbs_dropped": 3, "tables_dropped": 9})
		/* r.db_list().set_difference(["rethinkdb", "test"]).for_each(r.db_drop(r.row)) */

		suite.T().Log("About to run line #13: r.DBList().SetDifference([]interface{}{'rethinkdb', 'test'}).ForEach(r.DBDrop(r.Row))")

		runAndAssert(suite.Suite, expected_, r.DBList().SetDifference([]interface{}{"rethinkdb", "test"}).ForEach(r.DBDrop(r.Row)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #13")
	}
}
コード例 #12
0
ファイル: reql_control_test.go プロジェクト: freedmand/doc.vu
func (suite *ControlSuite) TestCases() {
	suite.T().Log("Running ControlSuite: Tests RQL control flow structures")

	tbl := r.DB("test").Table("tbl")
	_ = tbl // Prevent any noused variable errors
	tbl2 := r.DB("test").Table("tbl2")
	_ = tbl2 // Prevent any noused variable errors

	{
		// control.yaml line #7
		/* 2 */
		var expected_ int = 2
		/* r.expr(1).do(lambda v: v * 2) */

		suite.T().Log("About to run line #7: r.Expr(1).Do(func(v r.Term) interface{} { return r.Mul(v, 2)})")

		runAndAssert(suite.Suite, expected_, r.Expr(1).Do(func(v r.Term) interface{} { return r.Mul(v, 2) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #7")
	}

	{
		// control.yaml line #12
		/* [0, 1, 2, 3] */
		var expected_ []interface{} = []interface{}{0, 1, 2, 3}
		/* r.expr([0, 1, 2]).do(lambda v: v.append(3)) */

		suite.T().Log("About to run line #12: r.Expr([]interface{}{0, 1, 2}).Do(func(v r.Term) interface{} { return v.Append(3)})")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{0, 1, 2}).Do(func(v r.Term) interface{} { return v.Append(3) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #12")
	}

	{
		// control.yaml line #17
		/* 3 */
		var expected_ int = 3
		/* r.do(1, 2, lambda x, y: x + y) */

		suite.T().Log("About to run line #17: r.Do(1, 2, func(x r.Term, y r.Term) interface{} { return r.Add(x, y)})")

		runAndAssert(suite.Suite, expected_, r.Do(1, 2, func(x r.Term, y r.Term) interface{} { return r.Add(x, y) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #17")
	}

	{
		// control.yaml line #22
		/* 1 */
		var expected_ int = 1
		/* r.do(lambda: 1) */

		suite.T().Log("About to run line #22: r.Do(func() interface{} { return 1})")

		runAndAssert(suite.Suite, expected_, r.Do(func() interface{} { return 1 }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #22")
	}

	{
		// control.yaml line #38
		/* 1 */
		var expected_ int = 1
		/* r.do(1) */

		suite.T().Log("About to run line #38: r.Do(1)")

		runAndAssert(suite.Suite, expected_, r.Do(1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #38")
	}

	{
		// control.yaml line #53
		/* err("ReqlQueryLogicError", "Expected type ARRAY but found STRING.", [1, 0]) */
		var expected_ Err = err("ReqlQueryLogicError", "Expected type ARRAY but found STRING.")
		/* r.expr('abc').do(lambda v: v.append(3)) */

		suite.T().Log("About to run line #53: r.Expr('abc').Do(func(v r.Term) interface{} { return v.Append(3)})")

		runAndAssert(suite.Suite, expected_, r.Expr("abc").Do(func(v r.Term) interface{} { return v.Append(3) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #53")
	}

	{
		// control.yaml line #58
		/* err("ReqlQueryLogicError", "Expected type STRING but found NUMBER.", [1, 1]) */
		var expected_ Err = err("ReqlQueryLogicError", "Expected type STRING but found NUMBER.")
		/* r.expr('abc').do(lambda v: v + 3) */

		suite.T().Log("About to run line #58: r.Expr('abc').Do(func(v r.Term) interface{} { return r.Add(v, 3)})")

		runAndAssert(suite.Suite, expected_, r.Expr("abc").Do(func(v r.Term) interface{} { return r.Add(v, 3) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #58")
	}

	{
		// control.yaml line #63
		/* err("ReqlQueryLogicError", "Expected type STRING but found NUMBER.", [1]) */
		var expected_ Err = err("ReqlQueryLogicError", "Expected type STRING but found NUMBER.")
		/* r.expr('abc').do(lambda v: v + 'def') + 3 */

		suite.T().Log("About to run line #63: r.Expr('abc').Do(func(v r.Term) interface{} { return r.Add(v, 'def')}).Add(3)")

		runAndAssert(suite.Suite, expected_, r.Expr("abc").Do(func(v r.Term) interface{} { return r.Add(v, "def") }).Add(3), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #63")
	}

	{
		// control.yaml line #78
		/* 5 */
		var expected_ int = 5
		/* r.expr(5).do(r.row) */

		suite.T().Log("About to run line #78: r.Expr(5).Do(r.Row)")

		runAndAssert(suite.Suite, expected_, r.Expr(5).Do(r.Row), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #78")
	}

	{
		// control.yaml line #84
		/* 1 */
		var expected_ int = 1
		/* r.branch(True, 1, 2) */

		suite.T().Log("About to run line #84: r.Branch(true, 1, 2)")

		runAndAssert(suite.Suite, expected_, r.Branch(true, 1, 2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #84")
	}

	{
		// control.yaml line #86
		/* 2 */
		var expected_ int = 2
		/* r.branch(False, 1, 2) */

		suite.T().Log("About to run line #86: r.Branch(false, 1, 2)")

		runAndAssert(suite.Suite, expected_, r.Branch(false, 1, 2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #86")
	}

	{
		// control.yaml line #88
		/* ("c") */
		var expected_ string = "c"
		/* r.branch(1, 'c', False) */

		suite.T().Log("About to run line #88: r.Branch(1, 'c', false)")

		runAndAssert(suite.Suite, expected_, r.Branch(1, "c", false), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #88")
	}

	{
		// control.yaml line #90
		/* ([]) */
		var expected_ []interface{} = []interface{}{}
		/* r.branch(null, {}, []) */

		suite.T().Log("About to run line #90: r.Branch(nil, map[interface{}]interface{}{}, []interface{}{})")

		runAndAssert(suite.Suite, expected_, r.Branch(nil, map[interface{}]interface{}{}, []interface{}{}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #90")
	}

	{
		// control.yaml line #93
		/* err("ReqlQueryLogicError", "Expected type DATUM but found DATABASE:", []) */
		var expected_ Err = err("ReqlQueryLogicError", "Expected type DATUM but found DATABASE:")
		/* r.branch(r.db('test'), 1, 2) */

		suite.T().Log("About to run line #93: r.Branch(r.DB('test'), 1, 2)")

		runAndAssert(suite.Suite, expected_, r.Branch(r.DB("test"), 1, 2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #93")
	}

	{
		// control.yaml line #95
		/* err("ReqlQueryLogicError", "Expected type DATUM but found TABLE:", []) */
		var expected_ Err = err("ReqlQueryLogicError", "Expected type DATUM but found TABLE:")
		/* r.branch(tbl, 1, 2) */

		suite.T().Log("About to run line #95: r.Branch(tbl, 1, 2)")

		runAndAssert(suite.Suite, expected_, r.Branch(tbl, 1, 2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #95")
	}

	{
		// control.yaml line #97
		/* err("ReqlUserError", "a", []) */
		var expected_ Err = err("ReqlUserError", "a")
		/* r.branch(r.error("a"), 1, 2) */

		suite.T().Log("About to run line #97: r.Branch(r.Error('a'), 1, 2)")

		runAndAssert(suite.Suite, expected_, r.Branch(r.Error("a"), 1, 2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #97")
	}

	{
		// control.yaml line #100
		/* 1 */
		var expected_ int = 1
		/* r.branch([], 1, 2) */

		suite.T().Log("About to run line #100: r.Branch([]interface{}{}, 1, 2)")

		runAndAssert(suite.Suite, expected_, r.Branch([]interface{}{}, 1, 2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #100")
	}

	{
		// control.yaml line #102
		/* 1 */
		var expected_ int = 1
		/* r.branch({}, 1, 2) */

		suite.T().Log("About to run line #102: r.Branch(map[interface{}]interface{}{}, 1, 2)")

		runAndAssert(suite.Suite, expected_, r.Branch(map[interface{}]interface{}{}, 1, 2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #102")
	}

	{
		// control.yaml line #104
		/* 1 */
		var expected_ int = 1
		/* r.branch("a", 1, 2) */

		suite.T().Log("About to run line #104: r.Branch('a', 1, 2)")

		runAndAssert(suite.Suite, expected_, r.Branch("a", 1, 2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #104")
	}

	{
		// control.yaml line #106
		/* 1 */
		var expected_ int = 1
		/* r.branch(1.2, 1, 2) */

		suite.T().Log("About to run line #106: r.Branch(1.2, 1, 2)")

		runAndAssert(suite.Suite, expected_, r.Branch(1.2, 1, 2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #106")
	}

	{
		// control.yaml line #109
		/* 1 */
		var expected_ int = 1
		/* r.branch(True, 1, True, 2, 3) */

		suite.T().Log("About to run line #109: r.Branch(true, 1, true, 2, 3)")

		runAndAssert(suite.Suite, expected_, r.Branch(true, 1, true, 2, 3), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #109")
	}

	{
		// control.yaml line #111
		/* 1 */
		var expected_ int = 1
		/* r.branch(True, 1, False, 2, 3) */

		suite.T().Log("About to run line #111: r.Branch(true, 1, false, 2, 3)")

		runAndAssert(suite.Suite, expected_, r.Branch(true, 1, false, 2, 3), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #111")
	}

	{
		// control.yaml line #113
		/* 2 */
		var expected_ int = 2
		/* r.branch(False, 1, True, 2, 3) */

		suite.T().Log("About to run line #113: r.Branch(false, 1, true, 2, 3)")

		runAndAssert(suite.Suite, expected_, r.Branch(false, 1, true, 2, 3), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #113")
	}

	{
		// control.yaml line #115
		/* 3 */
		var expected_ int = 3
		/* r.branch(False, 1, False, 2, 3) */

		suite.T().Log("About to run line #115: r.Branch(false, 1, false, 2, 3)")

		runAndAssert(suite.Suite, expected_, r.Branch(false, 1, false, 2, 3), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #115")
	}

	{
		// control.yaml line #118
		/* err("ReqlQueryLogicError", "Cannot call `branch` term with an even number of arguments.") */
		var expected_ Err = err("ReqlQueryLogicError", "Cannot call `branch` term with an even number of arguments.")
		/* r.branch(True, 1, True, 2) */

		suite.T().Log("About to run line #118: r.Branch(true, 1, true, 2)")

		runAndAssert(suite.Suite, expected_, r.Branch(true, 1, true, 2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #118")
	}

	{
		// control.yaml line #122
		/* err("ReqlUserError", "Hello World", [0]) */
		var expected_ Err = err("ReqlUserError", "Hello World")
		/* r.error('Hello World') */

		suite.T().Log("About to run line #122: r.Error('Hello World')")

		runAndAssert(suite.Suite, expected_, r.Error("Hello World"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #122")
	}

	{
		// control.yaml line #125
		/* err("ReqlQueryLogicError", "Expected type STRING but found NUMBER.", [0]) */
		var expected_ Err = err("ReqlQueryLogicError", "Expected type STRING but found NUMBER.")
		/* r.error(5) */

		suite.T().Log("About to run line #125: r.Error(5)")

		runAndAssert(suite.Suite, expected_, r.Error(5), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #125")
	}

	{
		// control.yaml line #140
		/* 2 */
		var expected_ int = 2
		/* r.js('1 + 1') */

		suite.T().Log("About to run line #140: r.JS('1 + 1')")

		runAndAssert(suite.Suite, expected_, r.JS("1 + 1"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #140")
	}

	{
		// control.yaml line #143
		/* 4 */
		var expected_ int = 4
		/* r.js('1 + 1; 2 + 2') */

		suite.T().Log("About to run line #143: r.JS('1 + 1; 2 + 2')")

		runAndAssert(suite.Suite, expected_, r.JS("1 + 1; 2 + 2"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #143")
	}

	{
		// control.yaml line #146
		/* 3 */
		var expected_ int = 3
		/* r.do(1, 2, r.js('(function(a, b) { return a + b; })')) */

		suite.T().Log("About to run line #146: r.Do(1, 2, r.JS('(function(a, b) { return a + b; })'))")

		runAndAssert(suite.Suite, expected_, r.Do(1, 2, r.JS("(function(a, b) { return a + b; })")), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #146")
	}

	{
		// control.yaml line #149
		/* 2 */
		var expected_ int = 2
		/* r.expr(1).do(r.js('(function(x) { return x + 1; })')) */

		suite.T().Log("About to run line #149: r.Expr(1).Do(r.JS('(function(x) { return x + 1; })'))")

		runAndAssert(suite.Suite, expected_, r.Expr(1).Do(r.JS("(function(x) { return x + 1; })")), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #149")
	}

	{
		// control.yaml line #152
		/* 'foobar' */
		var expected_ string = "foobar"
		/* r.expr('foo').do(r.js('(function(x) { return x + "bar"; })')) */

		suite.T().Log("About to run line #152: r.Expr('foo').Do(r.JS('(function(x) { return x + \\'bar\\'; })'))")

		runAndAssert(suite.Suite, expected_, r.Expr("foo").Do(r.JS("(function(x) { return x + \"bar\"; })")), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #152")
	}

	{
		// control.yaml line #157
		/* 3 */
		var expected_ int = 3
		/* r.js('1 + 2', timeout=1.2) */

		suite.T().Log("About to run line #157: r.JS('1 + 2').OptArgs(r.JSOpts{Timeout: 1.2, })")

		runAndAssert(suite.Suite, expected_, r.JS("1 + 2").OptArgs(r.JSOpts{Timeout: 1.2}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #157")
	}

	{
		// control.yaml line #161
		/* err("ReqlQueryLogicError", "Query result must be of type DATUM, GROUPED_DATA, or STREAM (got FUNCTION).", [0]) */
		var expected_ Err = err("ReqlQueryLogicError", "Query result must be of type DATUM, GROUPED_DATA, or STREAM (got FUNCTION).")
		/* r.js('(function() { return 1; })') */

		suite.T().Log("About to run line #161: r.JS('(function() { return 1; })')")

		runAndAssert(suite.Suite, expected_, r.JS("(function() { return 1; })"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #161")
	}

	{
		// control.yaml line #164
		/* err("ReqlQueryLogicError", "SyntaxError: Unexpected token (", [0]) */
		var expected_ Err = err("ReqlQueryLogicError", "SyntaxError: Unexpected token (")
		/* r.js('function() { return 1; }') */

		suite.T().Log("About to run line #164: r.JS('function() { return 1; }')")

		runAndAssert(suite.Suite, expected_, r.JS("function() { return 1; }"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #164")
	}

	{
		// control.yaml line #168
		/* 1 */
		var expected_ int = 1
		/* r.do(1, 2, r.js('(function(a) { return a; })')) */

		suite.T().Log("About to run line #168: r.Do(1, 2, r.JS('(function(a) { return a; })'))")

		runAndAssert(suite.Suite, expected_, r.Do(1, 2, r.JS("(function(a) { return a; })")), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #168")
	}

	{
		// control.yaml line #171
		/* 1 */
		var expected_ int = 1
		/* r.do(1, 2, r.js('(function(a, b, c) { return a; })')) */

		suite.T().Log("About to run line #171: r.Do(1, 2, r.JS('(function(a, b, c) { return a; })'))")

		runAndAssert(suite.Suite, expected_, r.Do(1, 2, r.JS("(function(a, b, c) { return a; })")), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #171")
	}

	{
		// control.yaml line #174
		/* err("ReqlQueryLogicError", "Cannot convert javascript `undefined` to ql::datum_t.", [0]) */
		var expected_ Err = err("ReqlQueryLogicError", "Cannot convert javascript `undefined` to ql::datum_t.")
		/* r.do(1, 2, r.js('(function(a, b, c) { return c; })')) */

		suite.T().Log("About to run line #174: r.Do(1, 2, r.JS('(function(a, b, c) { return c; })'))")

		runAndAssert(suite.Suite, expected_, r.Do(1, 2, r.JS("(function(a, b, c) { return c; })")), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #174")
	}

	{
		// control.yaml line #177
		/* ([2, 3]) */
		var expected_ []interface{} = []interface{}{2, 3}
		/* r.expr([1, 2, 3]).filter(r.js('(function(a) { return a >= 2; })')) */

		suite.T().Log("About to run line #177: r.Expr([]interface{}{1, 2, 3}).Filter(r.JS('(function(a) { return a >= 2; })'))")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).Filter(r.JS("(function(a) { return a >= 2; })")), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #177")
	}

	{
		// control.yaml line #180
		/* ([2, 3, 4]) */
		var expected_ []interface{} = []interface{}{2, 3, 4}
		/* r.expr([1, 2, 3]).map(r.js('(function(a) { return a + 1; })')) */

		suite.T().Log("About to run line #180: r.Expr([]interface{}{1, 2, 3}).Map(r.JS('(function(a) { return a + 1; })'))")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).Map(r.JS("(function(a) { return a + 1; })")), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #180")
	}

	{
		// control.yaml line #183
		/* err("ReqlQueryLogicError", "Expected type FUNCTION but found DATUM:", [0]) */
		var expected_ Err = err("ReqlQueryLogicError", "Expected type FUNCTION but found DATUM:")
		/* r.expr([1, 2, 3]).map(r.js('1')) */

		suite.T().Log("About to run line #183: r.Expr([]interface{}{1, 2, 3}).Map(r.JS('1'))")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).Map(r.JS("1")), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #183")
	}

	{
		// control.yaml line #186
		/* err("ReqlQueryLogicError", "Cannot convert javascript `undefined` to ql::datum_t.", [0]) */
		var expected_ Err = err("ReqlQueryLogicError", "Cannot convert javascript `undefined` to ql::datum_t.")
		/* r.expr([1, 2, 3]).filter(r.js('(function(a) {})')) */

		suite.T().Log("About to run line #186: r.Expr([]interface{}{1, 2, 3}).Filter(r.JS('(function(a) {})'))")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).Filter(r.JS("(function(a) {})")), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #186")
	}

	{
		// control.yaml line #190
		/* err("ReqlQueryLogicError", "Expected type FUNCTION but found DATUM:", [0]) */
		var expected_ Err = err("ReqlQueryLogicError", "Expected type FUNCTION but found DATUM:")
		/* r.expr([1, 2, 3]).map(1) */

		suite.T().Log("About to run line #190: r.Expr([]interface{}{1, 2, 3}).Map(1)")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).Map(1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #190")
	}

	{
		// control.yaml line #193
		/* ([1, 2, 3]) */
		var expected_ []interface{} = []interface{}{1, 2, 3}
		/* r.expr([1, 2, 3]).filter('foo') */

		suite.T().Log("About to run line #193: r.Expr([]interface{}{1, 2, 3}).Filter('foo')")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).Filter("foo"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #193")
	}

	{
		// control.yaml line #195
		/* ([1, 2, 4]) */
		var expected_ []interface{} = []interface{}{1, 2, 4}
		/* r.expr([1, 2, 4]).filter([]) */

		suite.T().Log("About to run line #195: r.Expr([]interface{}{1, 2, 4}).Filter([]interface{}{})")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 4}).Filter([]interface{}{}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #195")
	}

	{
		// control.yaml line #197
		/* ([]) */
		var expected_ []interface{} = []interface{}{}
		/* r.expr([1, 2, 3]).filter(null) */

		suite.T().Log("About to run line #197: r.Expr([]interface{}{1, 2, 3}).Filter(nil)")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).Filter(nil), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #197")
	}

	{
		// control.yaml line #200
		/* ([]) */
		var expected_ []interface{} = []interface{}{}
		/* r.expr([1, 2, 4]).filter(False) */

		suite.T().Log("About to run line #200: r.Expr([]interface{}{1, 2, 4}).Filter(false)")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 4}).Filter(false), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #200")
	}

	{
		// control.yaml line #205
		/* 0 */
		var expected_ int = 0
		/* tbl.count() */

		suite.T().Log("About to run line #205: tbl.Count()")

		runAndAssert(suite.Suite, expected_, tbl.Count(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #205")
	}

	{
		// control.yaml line #210
		/* ({'deleted':0.0,'replaced':0.0,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':3}) */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 3}
		/* r.expr([1, 2, 3]).for_each(lambda row:tbl.insert({ 'id':row })) */

		suite.T().Log("About to run line #210: r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} { return tbl.Insert(map[interface{}]interface{}{'id': row, })})")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} { return tbl.Insert(map[interface{}]interface{}{"id": row}) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #210")
	}

	{
		// control.yaml line #214
		/* 3 */
		var expected_ int = 3
		/* tbl.count() */

		suite.T().Log("About to run line #214: tbl.Count()")

		runAndAssert(suite.Suite, expected_, tbl.Count(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #214")
	}

	{
		// control.yaml line #219
		/* ({'deleted':0.0,'replaced':9,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':0.0}) */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 9, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 0.0}
		/* r.expr([1,2,3]).for_each(lambda row:tbl.update({'foo':row})) */

		suite.T().Log("About to run line #219: r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} { return tbl.Update(map[interface{}]interface{}{'foo': row, })})")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} { return tbl.Update(map[interface{}]interface{}{"foo": row}) }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #219")
	}

	{
		// control.yaml line #225
		/* {'first_error':"Duplicate primary key `id`:\n{\n\t\"foo\":\t3,\n\t\"id\":\t1\n}\n{\n\t\"id\":\t1\n}",'deleted':0.0,'replaced':0.0,'unchanged':0.0,'errors':3,'skipped':0.0,'inserted':3} */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"first_error": "Duplicate primary key `id`:\n{\n\t\"foo\":\t3,\n\t\"id\":\t1\n}\n{\n\t\"id\":\t1\n}", "deleted": 0.0, "replaced": 0.0, "unchanged": 0.0, "errors": 3, "skipped": 0.0, "inserted": 3}
		/* r.expr([1,2,3]).for_each(lambda row:[tbl.insert({ 'id':row }), tbl.insert({ 'id':row*10 })]) */

		suite.T().Log("About to run line #225: r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} { return []interface{}{tbl.Insert(map[interface{}]interface{}{'id': row, }), tbl.Insert(map[interface{}]interface{}{'id': r.Mul(row, 10), })}})")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} {
			return []interface{}{tbl.Insert(map[interface{}]interface{}{"id": row}), tbl.Insert(map[interface{}]interface{}{"id": r.Mul(row, 10)})}
		}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #225")
	}

	{
		// control.yaml line #229
		/* 6 */
		var expected_ int = 6
		/* tbl.count() */

		suite.T().Log("About to run line #229: tbl.Count()")

		runAndAssert(suite.Suite, expected_, tbl.Count(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #229")
	}

	{
		// control.yaml line #232
		/* ({'deleted':0.0,'replaced':0.0,'generated_keys':arrlen(3,uuid()),'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':3}) */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "generated_keys": arrlen(3, compare.IsUUID()), "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 3}
		/* r.expr([1, 2, 3]).for_each( tbl2.insert({}) ) */

		suite.T().Log("About to run line #232: r.Expr([]interface{}{1, 2, 3}).ForEach(tbl2.Insert(map[interface{}]interface{}{}))")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(tbl2.Insert(map[interface{}]interface{}{})), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #232")
	}

	{
		// control.yaml line #235
		/* 1 */
		var expected_ int = 1
		/* tbl2.count() */

		suite.T().Log("About to run line #235: tbl2.Count()")

		runAndAssert(suite.Suite, expected_, tbl2.Count(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #235")
	}

	{
		// control.yaml line #240
		/* ({'deleted':0.0,'replaced':36,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':0.0}) */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 36, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 0.0}
		/* r.expr([1,2,3]).for_each(lambda row:[tbl.update({'foo':row}), tbl.update({'bar':row})]) */

		suite.T().Log("About to run line #240: r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} { return []interface{}{tbl.Update(map[interface{}]interface{}{'foo': row, }), tbl.Update(map[interface{}]interface{}{'bar': row, })}})")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} {
			return []interface{}{tbl.Update(map[interface{}]interface{}{"foo": row}), tbl.Update(map[interface{}]interface{}{"bar": row})}
		}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #240")
	}

	{
		// control.yaml line #245
		/* ({'deleted':0.0,'replaced':0.0,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':3}) */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 3}
		/* r.expr([1, 2, 3]).for_each( tbl2.insert({ 'id':r.row }) ) */

		suite.T().Log("About to run line #245: r.Expr([]interface{}{1, 2, 3}).ForEach(tbl2.Insert(map[interface{}]interface{}{'id': r.Row, }))")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(tbl2.Insert(map[interface{}]interface{}{"id": r.Row})), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #245")
	}

	{
		// control.yaml line #249
		/* err("ReqlQueryLogicError", "FOR_EACH expects one or more basic write queries.  Expected type ARRAY but found NUMBER.", [0]) */
		var expected_ Err = err("ReqlQueryLogicError", "FOR_EACH expects one or more basic write queries.  Expected type ARRAY but found NUMBER.")
		/* r.expr([1, 2, 3]).for_each(1) */

		suite.T().Log("About to run line #249: r.Expr([]interface{}{1, 2, 3}).ForEach(1)")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #249")
	}

	{
		// control.yaml line #252
		/* err("ReqlQueryLogicError", "FOR_EACH expects one or more basic write queries.  Expected type ARRAY but found NUMBER.", [1, 1]) */
		var expected_ Err = err("ReqlQueryLogicError", "FOR_EACH expects one or more basic write queries.  Expected type ARRAY but found NUMBER.")
		/* r.expr([1, 2, 3]).for_each(lambda x:x) */

		suite.T().Log("About to run line #252: r.Expr([]interface{}{1, 2, 3}).ForEach(func(x r.Term) interface{} { return x})")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(func(x r.Term) interface{} { return x }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #252")
	}

	{
		// control.yaml line #257
		/* err("ReqlQueryLogicError", "FOR_EACH expects one or more basic write queries.  Expected type ARRAY but found NUMBER.", [1, 1]) */
		var expected_ Err = err("ReqlQueryLogicError", "FOR_EACH expects one or more basic write queries.  Expected type ARRAY but found NUMBER.")
		/* r.expr([1, 2, 3]).for_each(r.row) */

		suite.T().Log("About to run line #257: r.Expr([]interface{}{1, 2, 3}).ForEach(r.Row)")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(r.Row), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #257")
	}

	{
		// control.yaml line #262
		/* err("ReqlQueryLogicError", "FOR_EACH expects one or more basic write queries.", [1, 1]) */
		var expected_ Err = err("ReqlQueryLogicError", "FOR_EACH expects one or more basic write queries.")
		/* r.expr([1, 2, 3]).for_each(lambda row:tbl) */

		suite.T().Log("About to run line #262: r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} { return tbl})")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} { return tbl }), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #262")
	}

	{
		// control.yaml line #271
		/* ({'deleted':0.0,'replaced':0.0,'generated_keys':arrlen(1,uuid()),'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':1}) */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "generated_keys": arrlen(1, compare.IsUUID()), "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 1}
		/* r.expr(1).do(tbl.insert({'foo':r.row})) */

		suite.T().Log("About to run line #271: r.Expr(1).Do(tbl.Insert(map[interface{}]interface{}{'foo': r.Row, }))")

		runAndAssert(suite.Suite, expected_, r.Expr(1).Do(tbl.Insert(map[interface{}]interface{}{"foo": r.Row})), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #271")
	}

	{
		// control.yaml line #275
		/* ({'deleted':0.0,'replaced':0.0,'generated_keys':arrlen(1,uuid()),'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':1}) */
		var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "generated_keys": arrlen(1, compare.IsUUID()), "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 1}
		/* r.expr([1, 2])[0].do(tbl.insert({'foo':r.row})) */

		suite.T().Log("About to run line #275: r.Expr([]interface{}{1, 2}).AtIndex(0).Do(tbl.Insert(map[interface{}]interface{}{'foo': r.Row, }))")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2}).AtIndex(0).Do(tbl.Insert(map[interface{}]interface{}{"foo": r.Row})), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #275")
	}

	{
		// control.yaml line #280
		/* err('ReqlCompileError', 'Cannot nest writes or meta ops in stream operations.  Use FOR_EACH instead.', [0]) */
		var expected_ Err = err("ReqlCompileError", "Cannot nest writes or meta ops in stream operations.  Use FOR_EACH instead.")
		/* r.expr([1, 2]).map(tbl.insert({'foo':r.row})) */

		suite.T().Log("About to run line #280: r.Expr([]interface{}{1, 2}).Map(tbl.Insert(map[interface{}]interface{}{'foo': r.Row, }))")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2}).Map(tbl.Insert(map[interface{}]interface{}{"foo": r.Row})), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #280")
	}

	{
		// control.yaml line #284
		/* err('ReqlCompileError', 'Cannot nest writes or meta ops in stream operations.  Use FOR_EACH instead.', [0]) */
		var expected_ Err = err("ReqlCompileError", "Cannot nest writes or meta ops in stream operations.  Use FOR_EACH instead.")
		/* r.expr([1, 2]).map(r.db('test').table_create('table_create_failure')) */

		suite.T().Log("About to run line #284: r.Expr([]interface{}{1, 2}).Map(r.DB('test').TableCreate('table_create_failure'))")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2}).Map(r.DB("test").TableCreate("table_create_failure")), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #284")
	}

	{
		// control.yaml line #287
		/* err('ReqlCompileError', 'Cannot nest writes or meta ops in stream operations.  Use FOR_EACH instead.', [0]) */
		var expected_ Err = err("ReqlCompileError", "Cannot nest writes or meta ops in stream operations.  Use FOR_EACH instead.")
		/* r.expr([1, 2]).map(tbl.insert({'foo':r.row}).get_field('inserted')) */

		suite.T().Log("About to run line #287: r.Expr([]interface{}{1, 2}).Map(tbl.Insert(map[interface{}]interface{}{'foo': r.Row, }).Field('inserted'))")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2}).Map(tbl.Insert(map[interface{}]interface{}{"foo": r.Row}).Field("inserted")), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #287")
	}

	{
		// control.yaml line #291
		/* err('ReqlCompileError', 'Cannot nest writes or meta ops in stream operations.  Use FOR_EACH instead.', [0]) */
		var expected_ Err = err("ReqlCompileError", "Cannot nest writes or meta ops in stream operations.  Use FOR_EACH instead.")
		/* r.expr([1, 2]).map(tbl.insert({'foo':r.row}).get_field('inserted').add(5)) */

		suite.T().Log("About to run line #291: r.Expr([]interface{}{1, 2}).Map(tbl.Insert(map[interface{}]interface{}{'foo': r.Row, }).Field('inserted').Add(5))")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2}).Map(tbl.Insert(map[interface{}]interface{}{"foo": r.Row}).Field("inserted").Add(5)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #291")
	}

	{
		// control.yaml line #295
		/* partial({'tables_created':1}) */
		var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"tables_created": 1})
		/* r.expr(1).do(r.db('test').table_create('table_create_success')) */

		suite.T().Log("About to run line #295: r.Expr(1).Do(r.DB('test').TableCreate('table_create_success'))")

		runAndAssert(suite.Suite, expected_, r.Expr(1).Do(r.DB("test").TableCreate("table_create_success")), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #295")
	}
}
コード例 #13
0
func (suite *TimesApiSuite) TestCases() {
	suite.T().Log("Running TimesApiSuite: date/time api (#977)")

	// times/api.yaml line #6
	// rt1 = 1375147296.6812
	suite.T().Log("Possibly executing: var rt1 float64 = 1375147296.6812")

	rt1 := 1375147296.6812
	_ = rt1 // Prevent any noused variable errors

	// times/api.yaml line #7
	// t1 = r.epoch_time(rt1)
	suite.T().Log("Possibly executing: var t1 r.Term = r.EpochTime(rt1)")

	t1 := r.EpochTime(rt1)
	_ = t1 // Prevent any noused variable errors

	// times/api.yaml line #8
	// t2 = r.epoch_time(rt1 + 1000)
	suite.T().Log("Possibly executing: var t2 r.Term = r.EpochTime(r.Add(rt1, 1000))")

	t2 := r.EpochTime(r.Add(rt1, 1000))
	_ = t2 // Prevent any noused variable errors

	{
		// times/api.yaml line #11
		/* (1375148296.681) */
		var expected_ float64 = 1375148296.681
		/* (t1 + 1000).to_epoch_time() */

		suite.T().Log("About to run line #11: r.Add(t1, 1000).ToEpochTime()")

		runAndAssert(suite.Suite, expected_, r.Add(t1, 1000).ToEpochTime(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #11")
	}

	{
		// times/api.yaml line #14
		/* (1375146296.681) */
		var expected_ float64 = 1375146296.681
		/* (t1 - 1000).to_epoch_time() */

		suite.T().Log("About to run line #14: r.Sub(t1, 1000).ToEpochTime()")

		runAndAssert(suite.Suite, expected_, r.Sub(t1, 1000).ToEpochTime(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #14")
	}

	{
		// times/api.yaml line #17
		/* 1000 */
		var expected_ int = 1000
		/* (t1 - (t1 - 1000)) */

		suite.T().Log("About to run line #17: r.Sub(t1, r.Sub(t1, 1000))")

		runAndAssert(suite.Suite, expected_, r.Sub(t1, r.Sub(t1, 1000)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #17")
	}

	{
		// times/api.yaml line #22
		/* false */
		var expected_ bool = false
		/* (t1 < t1) */

		suite.T().Log("About to run line #22: r.Lt(t1, t1)")

		runAndAssert(suite.Suite, expected_, r.Lt(t1, t1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #22")
	}

	{
		// times/api.yaml line #25
		/* true */
		var expected_ bool = true
		/* (t1 <= t1) */

		suite.T().Log("About to run line #25: r.Le(t1, t1)")

		runAndAssert(suite.Suite, expected_, r.Le(t1, t1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #25")
	}

	{
		// times/api.yaml line #29
		/* true */
		var expected_ bool = true
		/* (t1 == t1) */

		suite.T().Log("About to run line #29: r.Eq(t1, t1)")

		runAndAssert(suite.Suite, expected_, r.Eq(t1, t1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #29")
	}

	{
		// times/api.yaml line #32
		/* false */
		var expected_ bool = false
		/* (t1 != t1) */

		suite.T().Log("About to run line #32: r.Ne(t1, t1)")

		runAndAssert(suite.Suite, expected_, r.Ne(t1, t1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #32")
	}

	{
		// times/api.yaml line #34
		/* true */
		var expected_ bool = true
		/* (t1 >= t1) */

		suite.T().Log("About to run line #34: r.Ge(t1, t1)")

		runAndAssert(suite.Suite, expected_, r.Ge(t1, t1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #34")
	}

	{
		// times/api.yaml line #37
		/* false */
		var expected_ bool = false
		/* (t1 > t1) */

		suite.T().Log("About to run line #37: r.Gt(t1, t1)")

		runAndAssert(suite.Suite, expected_, r.Gt(t1, t1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #37")
	}

	{
		// times/api.yaml line #40
		/* true */
		var expected_ bool = true
		/* (t1 < t2) */

		suite.T().Log("About to run line #40: r.Lt(t1, t2)")

		runAndAssert(suite.Suite, expected_, r.Lt(t1, t2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #40")
	}

	{
		// times/api.yaml line #43
		/* true */
		var expected_ bool = true
		/* (t1 <= t2) */

		suite.T().Log("About to run line #43: r.Le(t1, t2)")

		runAndAssert(suite.Suite, expected_, r.Le(t1, t2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #43")
	}

	{
		// times/api.yaml line #47
		/* false */
		var expected_ bool = false
		/* (t1 == t2) */

		suite.T().Log("About to run line #47: r.Eq(t1, t2)")

		runAndAssert(suite.Suite, expected_, r.Eq(t1, t2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #47")
	}

	{
		// times/api.yaml line #50
		/* true */
		var expected_ bool = true
		/* (t1 != t2) */

		suite.T().Log("About to run line #50: r.Ne(t1, t2)")

		runAndAssert(suite.Suite, expected_, r.Ne(t1, t2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #50")
	}

	{
		// times/api.yaml line #52
		/* false */
		var expected_ bool = false
		/* (t1 >= t2) */

		suite.T().Log("About to run line #52: r.Ge(t1, t2)")

		runAndAssert(suite.Suite, expected_, r.Ge(t1, t2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #52")
	}

	{
		// times/api.yaml line #55
		/* false */
		var expected_ bool = false
		/* (t1 > t2) */

		suite.T().Log("About to run line #55: r.Gt(t1, t2)")

		runAndAssert(suite.Suite, expected_, r.Gt(t1, t2), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #55")
	}

	{
		// times/api.yaml line #60
		/* true */
		var expected_ bool = true
		/* t1.during(t1, t1 + 1000) */

		suite.T().Log("About to run line #60: t1.During(t1, r.Add(t1, 1000))")

		runAndAssert(suite.Suite, expected_, t1.During(t1, r.Add(t1, 1000)), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #60")
	}

	{
		// times/api.yaml line #64
		/* false */
		var expected_ bool = false
		/* t1.during(t1, t1 + 1000, left_bound='open') */

		suite.T().Log("About to run line #64: t1.During(t1, r.Add(t1, 1000)).OptArgs(r.DuringOpts{LeftBound: 'open', })")

		runAndAssert(suite.Suite, expected_, t1.During(t1, r.Add(t1, 1000)).OptArgs(r.DuringOpts{LeftBound: "open"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #64")
	}

	{
		// times/api.yaml line #67
		/* false */
		var expected_ bool = false
		/* t1.during(t1, t1) */

		suite.T().Log("About to run line #67: t1.During(t1, t1)")

		runAndAssert(suite.Suite, expected_, t1.During(t1, t1), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #67")
	}

	{
		// times/api.yaml line #70
		/* true */
		var expected_ bool = true
		/* t1.during(t1, t1, right_bound='closed') */

		suite.T().Log("About to run line #70: t1.During(t1, t1).OptArgs(r.DuringOpts{RightBound: 'closed', })")

		runAndAssert(suite.Suite, expected_, t1.During(t1, t1).OptArgs(r.DuringOpts{RightBound: "closed"}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #70")
	}

	{
		// times/api.yaml line #77
		/* 1375142400 */
		var expected_ int = 1375142400
		/* t1.date().to_epoch_time() */

		suite.T().Log("About to run line #77: t1.Date().ToEpochTime()")

		runAndAssert(suite.Suite, expected_, t1.Date().ToEpochTime(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #77")
	}

	{
		// times/api.yaml line #79
		/* (4896.681) */
		var expected_ float64 = 4896.681
		/* t1.time_of_day() */

		suite.T().Log("About to run line #79: t1.TimeOfDay()")

		runAndAssert(suite.Suite, expected_, t1.TimeOfDay(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #79")
	}

	{
		// times/api.yaml line #81
		/* 2013 */
		var expected_ int = 2013
		/* t1.year() */

		suite.T().Log("About to run line #81: t1.Year()")

		runAndAssert(suite.Suite, expected_, t1.Year(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #81")
	}

	{
		// times/api.yaml line #83
		/* 7 */
		var expected_ int = 7
		/* t1.month() */

		suite.T().Log("About to run line #83: t1.Month()")

		runAndAssert(suite.Suite, expected_, t1.Month(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #83")
	}

	{
		// times/api.yaml line #85
		/* 30 */
		var expected_ int = 30
		/* t1.day() */

		suite.T().Log("About to run line #85: t1.Day()")

		runAndAssert(suite.Suite, expected_, t1.Day(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #85")
	}

	{
		// times/api.yaml line #87
		/* 2 */
		var expected_ int = 2
		/* t1.day_of_week() */

		suite.T().Log("About to run line #87: t1.DayOfWeek()")

		runAndAssert(suite.Suite, expected_, t1.DayOfWeek(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #87")
	}

	{
		// times/api.yaml line #89
		/* 211 */
		var expected_ int = 211
		/* t1.day_of_year() */

		suite.T().Log("About to run line #89: t1.DayOfYear()")

		runAndAssert(suite.Suite, expected_, t1.DayOfYear(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #89")
	}

	{
		// times/api.yaml line #91
		/* 1 */
		var expected_ int = 1
		/* t1.hours() */

		suite.T().Log("About to run line #91: t1.Hours()")

		runAndAssert(suite.Suite, expected_, t1.Hours(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #91")
	}

	{
		// times/api.yaml line #93
		/* 21 */
		var expected_ int = 21
		/* t1.minutes() */

		suite.T().Log("About to run line #93: t1.Minutes()")

		runAndAssert(suite.Suite, expected_, t1.Minutes(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #93")
	}

	{
		// times/api.yaml line #95
		/* 36.681 */
		var expected_ float64 = 36.681
		/* t1.seconds() */

		suite.T().Log("About to run line #95: t1.Seconds()")

		runAndAssert(suite.Suite, expected_, t1.Seconds(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #95")
	}

	{
		// times/api.yaml line #99
		/* (1375165800.1) */
		var expected_ float64 = 1375165800.1
		/* r.time(2013, r.july, 29, 23, 30, 0.1, "-07:00").to_epoch_time() */

		suite.T().Log("About to run line #99: r.Time(2013, r.July, 29, 23, 30, 0.1, '-07:00').ToEpochTime()")

		runAndAssert(suite.Suite, expected_, r.Time(2013, r.July, 29, 23, 30, 0.1, "-07:00").ToEpochTime(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #99")
	}

	{
		// times/api.yaml line #101
		/* ("-07:00") */
		var expected_ string = "-07:00"
		/* r.time(2013, r.july, 29, 23, 30, 0.1, "-07:00").timezone() */

		suite.T().Log("About to run line #101: r.Time(2013, r.July, 29, 23, 30, 0.1, '-07:00').Timezone()")

		runAndAssert(suite.Suite, expected_, r.Time(2013, r.July, 29, 23, 30, 0.1, "-07:00").Timezone(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #101")
	}

	{
		// times/api.yaml line #103
		/* err("ReqlQueryLogicError", "Got 6 arguments to TIME (expected 4 or 7).", []) */
		var expected_ Err = err("ReqlQueryLogicError", "Got 6 arguments to TIME (expected 4 or 7).")
		/* r.time(2013, r.july, 29, 23, 30, 0.1).to_epoch_time() */

		suite.T().Log("About to run line #103: r.Time(2013, r.July, 29, 23, 30, 0.1).ToEpochTime()")

		runAndAssert(suite.Suite, expected_, r.Time(2013, r.July, 29, 23, 30, 0.1).ToEpochTime(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #103")
	}

	{
		// times/api.yaml line #105
		/* err("ReqlQueryLogicError", "Got 6 arguments to TIME (expected 4 or 7).", []) */
		var expected_ Err = err("ReqlQueryLogicError", "Got 6 arguments to TIME (expected 4 or 7).")
		/* r.time(2013, r.july, 29, 23, 30, 0.1).timezone() */

		suite.T().Log("About to run line #105: r.Time(2013, r.July, 29, 23, 30, 0.1).Timezone()")

		runAndAssert(suite.Suite, expected_, r.Time(2013, r.July, 29, 23, 30, 0.1).Timezone(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #105")
	}

	{
		// times/api.yaml line #107
		/* err("ReqlQueryLogicError", "Got 5 arguments to TIME (expected 4 or 7).", []) */
		var expected_ Err = err("ReqlQueryLogicError", "Got 5 arguments to TIME (expected 4 or 7).")
		/* r.time(2013, r.july, 29, 23, 30).to_epoch_time() */

		suite.T().Log("About to run line #107: r.Time(2013, r.July, 29, 23, 30).ToEpochTime()")

		runAndAssert(suite.Suite, expected_, r.Time(2013, r.July, 29, 23, 30).ToEpochTime(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #107")
	}

	{
		// times/api.yaml line #109
		/* err("ReqlQueryLogicError", "Expected type STRING but found NUMBER.", []) */
		var expected_ Err = err("ReqlQueryLogicError", "Expected type STRING but found NUMBER.")
		/* r.time(2013, r.july, 29, 23).to_epoch_time() */

		suite.T().Log("About to run line #109: r.Time(2013, r.July, 29, 23).ToEpochTime()")

		runAndAssert(suite.Suite, expected_, r.Time(2013, r.July, 29, 23).ToEpochTime(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #109")
	}

	{
		// times/api.yaml line #111
		/* 1375081200 */
		var expected_ int = 1375081200
		/* r.time(2013, r.july, 29, "-07:00").to_epoch_time() */

		suite.T().Log("About to run line #111: r.Time(2013, r.July, 29, '-07:00').ToEpochTime()")

		runAndAssert(suite.Suite, expected_, r.Time(2013, r.July, 29, "-07:00").ToEpochTime(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #111")
	}

	{
		// times/api.yaml line #113
		/* ("-07:00") */
		var expected_ string = "-07:00"
		/* r.time(2013, r.july, 29, "-07:00").timezone() */

		suite.T().Log("About to run line #113: r.Time(2013, r.July, 29, '-07:00').Timezone()")

		runAndAssert(suite.Suite, expected_, r.Time(2013, r.July, 29, "-07:00").Timezone(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #113")
	}

	{
		// times/api.yaml line #119
		/* 1375242965 */
		var expected_ int = 1375242965
		/* r.iso8601("2013-07-30T20:56:05-07:00").to_epoch_time() */

		suite.T().Log("About to run line #119: r.ISO8601('2013-07-30T20:56:05-07:00').ToEpochTime()")

		runAndAssert(suite.Suite, expected_, r.ISO8601("2013-07-30T20:56:05-07:00").ToEpochTime(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #119")
	}

	{
		// times/api.yaml line #122
		/* ("2013-07-30T20:56:05-07:00") */
		var expected_ string = "2013-07-30T20:56:05-07:00"
		/* r.epoch_time(1375242965).in_timezone("-07:00").to_iso8601() */

		suite.T().Log("About to run line #122: r.EpochTime(1375242965).InTimezone('-07:00').ToISO8601()")

		runAndAssert(suite.Suite, expected_, r.EpochTime(1375242965).InTimezone("-07:00").ToISO8601(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #122")
	}

	{
		// times/api.yaml line #125
		/* ("PTYPE<TIME>") */
		var expected_ string = "PTYPE<TIME>"
		/* r.now().type_of() */

		suite.T().Log("About to run line #125: r.Now().TypeOf()")

		runAndAssert(suite.Suite, expected_, r.Now().TypeOf(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #125")
	}

	{
		// times/api.yaml line #127
		/* 0 */
		var expected_ int = 0
		/* (r.now() - r.now()) */

		suite.T().Log("About to run line #127: r.Now().Sub(r.Now())")

		runAndAssert(suite.Suite, expected_, r.Now().Sub(r.Now()), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #127")
	}

	{
		// times/api.yaml line #132
		/* err("ReqlQueryLogicError", "ISO 8601 string has no time zone, and no default time zone was provided.", []) */
		var expected_ Err = err("ReqlQueryLogicError", "ISO 8601 string has no time zone, and no default time zone was provided.")
		/* r.iso8601("2013-07-30T20:56:05").to_iso8601() */

		suite.T().Log("About to run line #132: r.ISO8601('2013-07-30T20:56:05').ToISO8601()")

		runAndAssert(suite.Suite, expected_, r.ISO8601("2013-07-30T20:56:05").ToISO8601(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #132")
	}

	{
		// times/api.yaml line #136
		/* ("2013-07-30T20:56:05-07:00") */
		var expected_ string = "2013-07-30T20:56:05-07:00"
		/* r.iso8601("2013-07-30T20:56:05", default_timezone='-07').to_iso8601() */

		suite.T().Log("About to run line #136: r.ISO8601('2013-07-30T20:56:05').OptArgs(r.ISO8601Opts{DefaultTimezone: '-07', }).ToISO8601()")

		runAndAssert(suite.Suite, expected_, r.ISO8601("2013-07-30T20:56:05").OptArgs(r.ISO8601Opts{DefaultTimezone: "-07"}).ToISO8601(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #136")
	}

	{
		// times/api.yaml line #140
		/* ([1, 2, 3, 4, 5, 6, 7]) */
		var expected_ []interface{} = []interface{}{1, 2, 3, 4, 5, 6, 7}
		/* r.expr([r.monday, r.tuesday, r.wednesday, r.thursday, r.friday, r.saturday, r.sunday]) */

		suite.T().Log("About to run line #140: r.Expr([]interface{}{r.Monday, r.Tuesday, r.Wednesday, r.Thursday, r.Friday, r.Saturday, r.Sunday})")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{r.Monday, r.Tuesday, r.Wednesday, r.Thursday, r.Friday, r.Saturday, r.Sunday}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #140")
	}

	{
		// times/api.yaml line #142
		/* ([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) */
		var expected_ []interface{} = []interface{}{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}
		/* r.expr([r.january, r.february, r.march, r.april, r.may, r.june,
		r.july, r.august, r.september, r.october, r.november, r.december]) */

		suite.T().Log("About to run line #142: r.Expr([]interface{}{r.January, r.February, r.March, r.April, r.May, r.June, r.July, r.August, r.September, r.October, r.November, r.December})")

		runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{r.January, r.February, r.March, r.April, r.May, r.June, r.July, r.August, r.September, r.October, r.November, r.December}), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #142")
	}
}