void () { assertTrue(PyEvaluator.evaluateAsBooleanNoResolve(parseExpression("True"))); assertFalse(PyEvaluator.evaluateAsBooleanNoResolve(parseExpression("False"))); assertTrue(PyEvaluator.evaluateAsBooleanNoResolve(parseExpression("'a'"))); assertFalse(PyEvaluator.evaluateAsBooleanNoResolve(parseExpression("''"))); assertTrue(PyEvaluator.evaluateAsBooleanNoResolve(parseExpression("1"))); assertFalse(PyEvaluator.evaluateAsBooleanNoResolve(parseExpression("0"))); assertTrue(PyEvaluator.evaluateAsBooleanNoResolve(parseExpression("{1: 0}"))); assertFalse(PyEvaluator.evaluateAsBooleanNoResolve(parseExpression("{}"))); assertTrue(PyEvaluator.evaluateAsBooleanNoResolve(parseExpression("[1]"))); assertFalse(PyEvaluator.evaluateAsBooleanNoResolve(parseExpression("[]"))); assertNull(PyEvaluator.evaluateAsBooleanNoResolve(parseText("a = True\nexpr = a"))); assertNull(PyEvaluator.evaluateAsBooleanNoResolve(parseText("a = False\nexpr = a"))); assertNull(PyEvaluator.evaluateAsBooleanNoResolve(parseText("a = 'a'\nexpr = a"))); assertNull(PyEvaluator.evaluateAsBooleanNoResolve(parseText("a = ''\nexpr = a"))); assertNull(PyEvaluator.evaluateAsBooleanNoResolve(parseText("a = 1\nexpr = a"))); assertNull(PyEvaluator.evaluateAsBooleanNoResolve(parseText("a = 0\nexpr = a"))); assertNull(PyEvaluator.evaluateAsBooleanNoResolve(parseText("a = {1: 0}\nexpr = a"))); assertNull(PyEvaluator.evaluateAsBooleanNoResolve(parseText("a = {}\nexpr = a"))); assertNull(PyEvaluator.evaluateAsBooleanNoResolve(parseText("a = [1]\nexpr = a"))); assertNull(PyEvaluator.evaluateAsBooleanNoResolve(parseText("a = []\nexpr = a"))); }