Fix old python2 test issue.
The map function returns a list in python2, but not in python3.
Force the test in cpp.py get_blocks() function to return a list.
Test: All cpp.py unit tests pass.
Change-Id: I1a63b92ac6cdb785830846fbd7e726eca7520e96
diff --git a/libc/kernel/tools/cpp.py b/libc/kernel/tools/cpp.py
index 26121ca..a040474 100755
--- a/libc/kernel/tools/cpp.py
+++ b/libc/kernel/tools/cpp.py
@@ -1647,7 +1647,7 @@
def get_blocks(self, lines):
blocks = BlockParser().parse(CppStringTokenizer('\n'.join(lines)))
- return map(lambda a: str(a), blocks)
+ return list(map(lambda a: str(a), blocks))
def test_hash(self):
self.assertEqual(self.get_blocks(["#error hello"]), ["#error hello"])