def testCondOneBranchConstantTuple(self):

    def fun(x):
        if (x < 3):
            return (1.0, 2.0, 3.0)
        else:
            return (x, 2.0, 4.0)

    @api.jit
    def cfun(x):
        return lax.cond(lax.lt(x, 3), (lambda x: (1, 2.0, 3.0)), (lambda x: (x, 2.0, 4.0)), x)
    self.assertEqual(fun(0), cfun(0))
    self.assertEqual(cfun(0), (1, 2.0, 3.0))
    self.assertEqual(fun(4), cfun(4))
    self.assertEqual(cfun(4), (4, 2.0, 4.0))
def testCondOneBranchConstantTuple(self):

    def fun(x):
        if (x < 3):
            return (1.0, 2.0, 3.0)
        else:
            return (x, 2.0, 4.0)

    @api.jit
    def cfun(x):
        return lax.cond(lax.lt(x, 3), (lambda x: (1, 2.0, 3.0)), (lambda x: (x, 2.0, 4.0)), x)
    self.assertEqual(fun(0), cfun(0))
    self.assertEqual(cfun(0), (1, 2.0, 3.0))
    self.assertEqual(fun(4), cfun(4))
    self.assertEqual(cfun(4), (4, 2.0, 4.0))