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

Unified Diff: runtime/vm/bigint_operations_test.cc

Issue 207303002: Handle 0 in BigintOperations::ToDecimalCString. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | « runtime/vm/bigint_operations.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/bigint_operations_test.cc
===================================================================
--- runtime/vm/bigint_operations_test.cc (revision 34205)
+++ runtime/vm/bigint_operations_test.cc (working copy)
@@ -491,6 +491,14 @@
TEST_CASE(BigintDecStrings) {
{
const Bigint& bigint = Bigint::Handle(
+ BigintOperations::NewFromCString("0x0"));
+ const char* str =
+ BigintOperations::ToDecimalCString(bigint, &ZoneAllocator);
+ EXPECT_STREQ("0", str);
+ }
+
+ {
+ const Bigint& bigint = Bigint::Handle(
BigintOperations::NewFromCString("0x123"));
const char* str =
BigintOperations::ToDecimalCString(bigint, &ZoneAllocator);
« no previous file with comments | « runtime/vm/bigint_operations.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698