Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2490)

Unified Diff: build/gn_helpers_unittest.py

Issue 1844823002: Fix gn_helpers' parsing of bools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/gn_helpers.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/gn_helpers_unittest.py
diff --git a/build/gn_helpers_unittest.py b/build/gn_helpers_unittest.py
index a493f6778ae24f2097d682ff1e01c8369d3972ac..72123f9359cd438089ae6d52f3be86fbbbded454 100644
--- a/build/gn_helpers_unittest.py
+++ b/build/gn_helpers_unittest.py
@@ -27,6 +27,13 @@ class UnitTest(unittest.TestCase):
parser = gn_helpers.GNValueParser('123 456')
parser.Parse()
+ def test_ParseBool(self):
+ parser = gn_helpers.GNValueParser('true')
+ self.assertEqual(parser.Parse(), True)
+
+ parser = gn_helpers.GNValueParser('false')
+ self.assertEqual(parser.Parse(), False)
+
def test_ParseNumber(self):
parser = gn_helpers.GNValueParser('123')
self.assertEqual(parser.ParseNumber(), 123)
« no previous file with comments | « build/gn_helpers.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698