-#!/usr/bin/env python3
+#!/usr/bin/env python2
#
# Copyright (C) 2014 The Android Open Source Project
#
# constant folding returns an integer constant with value either 11 or 22.
#
+from __future__ import print_function
import argparse
import os
import re
-#!/usr/bin/env python3
+#!/usr/bin/env python2
#
# Copyright (C) 2014 The Android Open Source Project
#
class TestOutputFile_Parse(unittest.TestCase):
def __parsesTo(self, string, expected):
+ if isinstance(string, str):
+ string = unicode(string)
outputStream = io.StringIO(string)
return self.assertEqual(checker.OutputFile(outputStream).groups, expected)
class TestCheckFile_Parse(unittest.TestCase):
def __parsesTo(self, string, expected):
+ if isinstance(string, str):
+ string = unicode(string)
checkStream = io.StringIO(string)
return self.assertEqual(checker.CheckFile("CHECK", checkStream).groups, expected)