Skip to content

Commit

Permalink
Merge pull request #1962 from gittywithexcitement/master
Browse files Browse the repository at this point in the history
Add unittests: compare BigUint(0) to 0UL
  • Loading branch information
andralex committed Mar 14, 2014
2 parents 9e9c2f6 + 30999e7 commit 20833c3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions std/internal/math/biguintcore.d
Expand Up @@ -888,6 +888,12 @@ unittest
BigUint a = [1];
assert(a == 1);
assert(a < 0x8000_0000_0000_0000UL); // bug 9548

// bug 12234
BigUint z = [0];
assert(z == 0UL);
assert(!(z > 0UL));
assert(!(z < 0UL));
}

// Remove leading zeros from x, to restore the BigUint invariant
Expand Down

0 comments on commit 20833c3

Please sign in to comment.