• Clemens Hammacher's avatar
    [base] Allow comparing enums in (D)CHECKs · 3a063911
    Clemens Hammacher authored
    In the current implementation, compilation would fail because
    operator<< is not defined for enum classes. For others, the compiler
    finds more than one operator<<, so it fails because it's ambiguous.
    
    This CL fixes this by printing the integer value for enums, uses the
    operator<< for all values that support it, and prints "<unprintable>"
    otherwise.
    
    Also, lots of unit tests.
    
    R=ishell@chromium.org
    
    Bug: v8:6837
    Change-Id: I895ed226672aa07213f9605e094b87af186ec2e4
    Reviewed-on: https://chromium-review.googlesource.com/671016
    Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
    Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#48110}
    3a063911
Name
Last commit
Last update
..
platform Loading commit data...
utils Loading commit data...
atomic-utils-unittest.cc Loading commit data...
bits-unittest.cc Loading commit data...
cpu-unittest.cc Loading commit data...
division-by-constant-unittest.cc Loading commit data...
flags-unittest.cc Loading commit data...
functional-unittest.cc Loading commit data...
ieee754-unittest.cc Loading commit data...
iterator-unittest.cc Loading commit data...
logging-unittest.cc Loading commit data...
macros-unittest.cc Loading commit data...
ostreams-unittest.cc Loading commit data...
sys-info-unittest.cc Loading commit data...
template-utils-unittest.cc Loading commit data...