]> granicus.if.org Git - icu/commitdiff
ICU-21900 Update double-conversion to v3.2.0 cldr/2022-02-23
authorShane F. Carr <shane@unicode.org>
Wed, 23 Feb 2022 18:44:55 +0000 (10:44 -0800)
committerPeter Edberg <42151464+pedberg-icu@users.noreply.github.com>
Wed, 23 Feb 2022 21:18:32 +0000 (13:18 -0800)
icu4c/source/i18n/double-conversion-ieee.h
icu4c/source/i18n/double-conversion-utils.h
vendor/double-conversion/upstream/.github/workflows/cmake.yml [new file with mode: 0644]
vendor/double-conversion/upstream/BUILD [moved from vendor/double-conversion/upstream/BUILD.bazel with 100% similarity]
vendor/double-conversion/upstream/CMakeLists.txt
vendor/double-conversion/upstream/Changelog
vendor/double-conversion/upstream/Makefile
vendor/double-conversion/upstream/README.md
vendor/double-conversion/upstream/double-conversion/ieee.h
vendor/double-conversion/upstream/double-conversion/utils.h
vendor/double-conversion/upstream/test/cctest/cctest.cc

index 31c35867de5610fbf1292738af3e9fd32b05bcab..2940acb16981e856a558553b77b95127b0f420a9 100644 (file)
@@ -164,11 +164,19 @@ class Double {
   }
 
   bool IsQuietNan() const {
+#if (defined(__mips__) && !defined(__mips_nan2008)) || defined(__hppa__)
+    return IsNan() && ((AsUint64() & kQuietNanBit) == 0);
+#else
     return IsNan() && ((AsUint64() & kQuietNanBit) != 0);
+#endif
   }
 
   bool IsSignalingNan() const {
+#if (defined(__mips__) && !defined(__mips_nan2008)) || defined(__hppa__)
+    return IsNan() && ((AsUint64() & kQuietNanBit) != 0);
+#else
     return IsNan() && ((AsUint64() & kQuietNanBit) == 0);
+#endif
   }
 
 
@@ -250,7 +258,12 @@ class Double {
  private:
   static const int kDenormalExponent = -kExponentBias + 1;
   static const uint64_t kInfinity = DOUBLE_CONVERSION_UINT64_2PART_C(0x7FF00000, 00000000);
+#if (defined(__mips__) && !defined(__mips_nan2008)) || defined(__hppa__)
+  static const uint64_t kNaN = DOUBLE_CONVERSION_UINT64_2PART_C(0x7FF7FFFF, FFFFFFFF);
+#else
   static const uint64_t kNaN = DOUBLE_CONVERSION_UINT64_2PART_C(0x7FF80000, 00000000);
+#endif
+
 
   const uint64_t d64_;
 
@@ -350,11 +363,19 @@ class Single {
   }
 
   bool IsQuietNan() const {
+#if (defined(__mips__) && !defined(__mips_nan2008)) || defined(__hppa__)
+    return IsNan() && ((AsUint32() & kQuietNanBit) == 0);
+#else
     return IsNan() && ((AsUint32() & kQuietNanBit) != 0);
+#endif
   }
 
   bool IsSignalingNan() const {
+#if (defined(__mips__) && !defined(__mips_nan2008)) || defined(__hppa__)
+    return IsNan() && ((AsUint32() & kQuietNanBit) != 0);
+#else
     return IsNan() && ((AsUint32() & kQuietNanBit) == 0);
+#endif
   }
 
 
@@ -424,7 +445,11 @@ class Single {
   static const int kDenormalExponent = -kExponentBias + 1;
   static const int kMaxExponent = 0xFF - kExponentBias;
   static const uint32_t kInfinity = 0x7F800000;
+#if (defined(__mips__) && !defined(__mips_nan2008)) || defined(__hppa__)
+  static const uint32_t kNaN = 0x7FBFFFFF;
+#else
   static const uint32_t kNaN = 0x7FC00000;
+#endif
 
   const uint32_t d32_;
 
index 7f23e0a8250d2bb07a4ac231e72d7c805ec94a68..11c92717c10d7265870a4eb37d505fd5e67c6e63 100644 (file)
@@ -37,6 +37,9 @@
 #ifndef DOUBLE_CONVERSION_UTILS_H_
 #define DOUBLE_CONVERSION_UTILS_H_
 
+// Use DOUBLE_CONVERSION_NON_PREFIXED_MACROS to get unprefixed macros as was
+// the case in double-conversion releases prior to 3.1.6
+
 #include <cstdlib>
 #include <cstring>
 
 #define DOUBLE_CONVERSION_ASSERT(condition)         \
     U_ASSERT(condition)
 #endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(ASSERT)
+#define ASSERT DOUBLE_CONVERSION_ASSERT
+#endif
+
 #ifndef DOUBLE_CONVERSION_UNIMPLEMENTED
 #define DOUBLE_CONVERSION_UNIMPLEMENTED() (abort())
 #endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(UNIMPLEMENTED)
+#define UNIMPLEMENTED DOUBLE_CONVERSION_UNIMPLEMENTED
+#endif
+
 #ifndef DOUBLE_CONVERSION_NO_RETURN
 #ifdef _MSC_VER
 #define DOUBLE_CONVERSION_NO_RETURN __declspec(noreturn)
 #define DOUBLE_CONVERSION_NO_RETURN __attribute__((noreturn))
 #endif
 #endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(NO_RETURN)
+#define NO_RETURN DOUBLE_CONVERSION_NO_RETURN
+#endif
+
 #ifndef DOUBLE_CONVERSION_UNREACHABLE
 #ifdef _MSC_VER
 void DOUBLE_CONVERSION_NO_RETURN abort_noreturn();
@@ -65,6 +80,9 @@ inline void abort_noreturn() { abort(); }
 #define DOUBLE_CONVERSION_UNREACHABLE()   (abort())
 #endif
 #endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(UNREACHABLE)
+#define UNREACHABLE DOUBLE_CONVERSION_UNREACHABLE
+#endif
 
 // Not all compilers support __has_attribute and combining a check for both
 // ifdef and __has_attribute on the same preprocessor line isn't portable.
@@ -81,12 +99,18 @@ inline void abort_noreturn() { abort(); }
 #define DOUBLE_CONVERSION_UNUSED
 #endif
 #endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(UNUSED)
+#define UNUSED DOUBLE_CONVERSION_UNUSED
+#endif
 
 #if DOUBLE_CONVERSION_HAS_ATTRIBUTE(uninitialized)
 #define DOUBLE_CONVERSION_STACK_UNINITIALIZED __attribute__((uninitialized))
 #else
 #define DOUBLE_CONVERSION_STACK_UNINITIALIZED
 #endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(STACK_UNINITIALIZED)
+#define STACK_UNINITIALIZED DOUBLE_CONVERSION_STACK_UNINITIALIZED
+#endif
 
 // Double operations detection based on target architecture.
 // Linux uses a 80bit wide floating point stack on x86. This induces double
@@ -127,7 +151,7 @@ int main(int argc, char** argv) {
     defined(_MIPS_ARCH_MIPS32R2) || defined(__ARMEB__) ||\
     defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \
     defined(__riscv) || defined(__e2k__) || \
-    defined(__or1k__) || defined(__arc__) || \
+    defined(__or1k__) || defined(__arc__) || defined(__ARC64__) || \
     defined(__microblaze__) || defined(__XTENSA__) || \
     defined(__EMSCRIPTEN__) || defined(__wasm32__)
 #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
@@ -144,6 +168,9 @@ int main(int argc, char** argv) {
 #else
 #error Target architecture was not detected as supported by Double-Conversion.
 #endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(CORRECT_DOUBLE_OPERATIONS)
+#define CORRECT_DOUBLE_OPERATIONS DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS
+#endif
 
 #if defined(_WIN32) && !defined(__MINGW32__)
 
@@ -169,7 +196,9 @@ typedef uint16_t uc16;
 // Usage: instead of writing 0x1234567890123456
 //      write DOUBLE_CONVERSION_UINT64_2PART_C(0x12345678,90123456);
 #define DOUBLE_CONVERSION_UINT64_2PART_C(a, b) (((static_cast<uint64_t>(a) << 32) + 0x##b##u))
-
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(UINT64_2PART_C)
+#define UINT64_2PART_C DOUBLE_CONVERSION_UINT64_2PART_C
+#endif
 
 // The expression DOUBLE_CONVERSION_ARRAY_SIZE(a) is a compile-time constant of type
 // size_t which represents the number of elements of the given
@@ -180,6 +209,9 @@ typedef uint16_t uc16;
   ((sizeof(a) / sizeof(*(a))) /                         \
   static_cast<size_t>(!(sizeof(a) % sizeof(*(a)))))
 #endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(ARRAY_SIZE)
+#define ARRAY_SIZE DOUBLE_CONVERSION_ARRAY_SIZE
+#endif
 
 // A macro to disallow the evil copy constructor and operator= functions
 // This should be used in the private: declarations for a class
@@ -188,6 +220,9 @@ typedef uint16_t uc16;
   TypeName(const TypeName&);                    \
   void operator=(const TypeName&)
 #endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(DC_DISALLOW_COPY_AND_ASSIGN)
+#define DC_DISALLOW_COPY_AND_ASSIGN DOUBLE_CONVERSION_DISALLOW_COPY_AND_ASSIGN
+#endif
 
 // A macro to disallow all the implicit constructors, namely the
 // default constructor, copy constructor and operator= functions.
@@ -200,6 +235,9 @@ typedef uint16_t uc16;
   TypeName();                                    \
   DOUBLE_CONVERSION_DISALLOW_COPY_AND_ASSIGN(TypeName)
 #endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(DC_DISALLOW_IMPLICIT_CONSTRUCTORS)
+#define DC_DISALLOW_IMPLICIT_CONSTRUCTORS DOUBLE_CONVERSION_DISALLOW_IMPLICIT_CONSTRUCTORS
+#endif
 
 // ICU PATCH: Wrap in ICU namespace
 U_NAMESPACE_BEGIN
diff --git a/vendor/double-conversion/upstream/.github/workflows/cmake.yml b/vendor/double-conversion/upstream/.github/workflows/cmake.yml
new file mode 100644 (file)
index 0000000..8ec26cf
--- /dev/null
@@ -0,0 +1,34 @@
+name: CMake
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+env:
+  # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
+  BUILD_TYPE: Debug
+
+jobs:
+  build:
+    # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
+    # You can convert this to a matrix build if you need cross-platform coverage.
+    # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
+    runs-on: ubuntu-latest
+
+    steps:
+    - uses: actions/checkout@v2
+
+    - name: Configure CMake
+      # Configure CMake in a 'build' subdirectory.
+      run: cmake -B ${{github.workspace}}/build -DBUILD_TESTING=ON
+
+    - name: Build
+      # Build your program with the given configuration
+      run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
+
+    - name: Test
+      working-directory: ${{github.workspace}}/build
+      # Execute all tests.  
+      run: test/cctest/cctest
index 46e3abf54dcddab424bbaa728a0282f1c7806468..e13bcdd27cbf040712e4a66e2a4ac879b9b68527 100644 (file)
@@ -1,5 +1,5 @@
 cmake_minimum_required(VERSION 3.0)
-project(double-conversion VERSION 3.1.5)
+project(double-conversion VERSION 3.2.0)
 
 if(BUILD_SHARED_LIBS AND MSVC)
   set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
index c7bb86e0889d2c3b1fef16ef602c4009ea77f99f..200e98a930720b433022e16df8dd1556bdbc17e2 100644 (file)
@@ -1,3 +1,20 @@
+2022-01-10:
+  Fix quiet NANs on MIPS* and PA-RISC architectures.
+  Update version number.
+
+2021-12-22:
+  Add support of Synopsys ARC64 architecture.
+  Reintroduce macros, if DOUBLE_CONVERSION_NON_PREFIXED_MACROS is set.
+
+2021-12-04:
+  Update version number.
+
+2021-10-04:
+  Consistently use semicolons after DOUBLE_CONVERSION_ASSERT.
+
+2021-07-16:
+  Fix spelling.
+
 2021-05-19:
   Loongarch is a RISC-style command system architecture.
   Add support for loongarch architecture.
index 4e7e104a2147b9a928836e04a2981d288f2ab4cd..873f4b95907a0f710b2d257614555cc15a847a1d 100644 (file)
@@ -2,6 +2,6 @@ all:
        scons debug=1
 
 test:
-       ./run_tests --list | tr -d '<' | xargs ./run_tests
+       ./run_tests
 
 .PHONY: test all
index 7b9869eb7c266da7a48068d8799e2ed488765cd5..e5d9a4e68246252748b31ad769e2ab32e4552b04 100644 (file)
@@ -49,7 +49,7 @@ Use `-DBUILD_TESTING=ON` to build the test executable.
 
     cmake . -DBUILD_TESTING=ON
     make
-    test/cctest/cctest --list | tr -d '<' | xargs test/cctest/cctest
+    test/cctest/cctest
 
 [0]: http://www.scons.org/
 [1]: https://cmake.org/
index 3c2a5979ffee017419d751f3dbb7950c3077e682..9203f4d558e0cea52007cc5809a715042451e8f9 100644 (file)
@@ -150,11 +150,19 @@ class Double {
   }
 
   bool IsQuietNan() const {
+#if (defined(__mips__) && !defined(__mips_nan2008)) || defined(__hppa__)
+    return IsNan() && ((AsUint64() & kQuietNanBit) == 0);
+#else
     return IsNan() && ((AsUint64() & kQuietNanBit) != 0);
+#endif
   }
 
   bool IsSignalingNan() const {
+#if (defined(__mips__) && !defined(__mips_nan2008)) || defined(__hppa__)
+    return IsNan() && ((AsUint64() & kQuietNanBit) != 0);
+#else
     return IsNan() && ((AsUint64() & kQuietNanBit) == 0);
+#endif
   }
 
 
@@ -236,7 +244,12 @@ class Double {
  private:
   static const int kDenormalExponent = -kExponentBias + 1;
   static const uint64_t kInfinity = DOUBLE_CONVERSION_UINT64_2PART_C(0x7FF00000, 00000000);
+#if (defined(__mips__) && !defined(__mips_nan2008)) || defined(__hppa__)
+  static const uint64_t kNaN = DOUBLE_CONVERSION_UINT64_2PART_C(0x7FF7FFFF, FFFFFFFF);
+#else
   static const uint64_t kNaN = DOUBLE_CONVERSION_UINT64_2PART_C(0x7FF80000, 00000000);
+#endif
+
 
   const uint64_t d64_;
 
@@ -336,11 +349,19 @@ class Single {
   }
 
   bool IsQuietNan() const {
+#if (defined(__mips__) && !defined(__mips_nan2008)) || defined(__hppa__)
+    return IsNan() && ((AsUint32() & kQuietNanBit) == 0);
+#else
     return IsNan() && ((AsUint32() & kQuietNanBit) != 0);
+#endif
   }
 
   bool IsSignalingNan() const {
+#if (defined(__mips__) && !defined(__mips_nan2008)) || defined(__hppa__)
+    return IsNan() && ((AsUint32() & kQuietNanBit) != 0);
+#else
     return IsNan() && ((AsUint32() & kQuietNanBit) == 0);
+#endif
   }
 
 
@@ -410,7 +431,11 @@ class Single {
   static const int kDenormalExponent = -kExponentBias + 1;
   static const int kMaxExponent = 0xFF - kExponentBias;
   static const uint32_t kInfinity = 0x7F800000;
+#if (defined(__mips__) && !defined(__mips_nan2008)) || defined(__hppa__)
+  static const uint32_t kNaN = 0x7FBFFFFF;
+#else
   static const uint32_t kNaN = 0x7FC00000;
+#endif
 
   const uint32_t d32_;
 
index b279f4bcd2a5860876337faff77d5beb21889bd3..41078b6c2c4a2d78fa1e185def6ef539ad5be1fa 100644 (file)
@@ -28,6 +28,9 @@
 #ifndef DOUBLE_CONVERSION_UTILS_H_
 #define DOUBLE_CONVERSION_UTILS_H_
 
+// Use DOUBLE_CONVERSION_NON_PREFIXED_MACROS to get unprefixed macros as was
+// the case in double-conversion releases prior to 3.1.6
+
 #include <cstdlib>
 #include <cstring>
 
 #define DOUBLE_CONVERSION_ASSERT(condition)         \
     assert(condition)
 #endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(ASSERT)
+#define ASSERT DOUBLE_CONVERSION_ASSERT
+#endif
+
 #ifndef DOUBLE_CONVERSION_UNIMPLEMENTED
 #define DOUBLE_CONVERSION_UNIMPLEMENTED() (abort())
 #endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(UNIMPLEMENTED)
+#define UNIMPLEMENTED DOUBLE_CONVERSION_UNIMPLEMENTED
+#endif
+
 #ifndef DOUBLE_CONVERSION_NO_RETURN
 #ifdef _MSC_VER
 #define DOUBLE_CONVERSION_NO_RETURN __declspec(noreturn)
 #define DOUBLE_CONVERSION_NO_RETURN __attribute__((noreturn))
 #endif
 #endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(NO_RETURN)
+#define NO_RETURN DOUBLE_CONVERSION_NO_RETURN
+#endif
+
 #ifndef DOUBLE_CONVERSION_UNREACHABLE
 #ifdef _MSC_VER
 void DOUBLE_CONVERSION_NO_RETURN abort_noreturn();
@@ -55,6 +70,9 @@ inline void abort_noreturn() { abort(); }
 #define DOUBLE_CONVERSION_UNREACHABLE()   (abort())
 #endif
 #endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(UNREACHABLE)
+#define UNREACHABLE DOUBLE_CONVERSION_UNREACHABLE
+#endif
 
 // Not all compilers support __has_attribute and combining a check for both
 // ifdef and __has_attribute on the same preprocessor line isn't portable.
@@ -71,12 +89,18 @@ inline void abort_noreturn() { abort(); }
 #define DOUBLE_CONVERSION_UNUSED
 #endif
 #endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(UNUSED)
+#define UNUSED DOUBLE_CONVERSION_UNUSED
+#endif
 
 #if DOUBLE_CONVERSION_HAS_ATTRIBUTE(uninitialized)
 #define DOUBLE_CONVERSION_STACK_UNINITIALIZED __attribute__((uninitialized))
 #else
 #define DOUBLE_CONVERSION_STACK_UNINITIALIZED
 #endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(STACK_UNINITIALIZED)
+#define STACK_UNINITIALIZED DOUBLE_CONVERSION_STACK_UNINITIALIZED
+#endif
 
 // Double operations detection based on target architecture.
 // Linux uses a 80bit wide floating point stack on x86. This induces double
@@ -117,7 +141,7 @@ int main(int argc, char** argv) {
     defined(_MIPS_ARCH_MIPS32R2) || defined(__ARMEB__) ||\
     defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \
     defined(__riscv) || defined(__e2k__) || \
-    defined(__or1k__) || defined(__arc__) || \
+    defined(__or1k__) || defined(__arc__) || defined(__ARC64__) || \
     defined(__microblaze__) || defined(__XTENSA__) || \
     defined(__EMSCRIPTEN__) || defined(__wasm32__)
 #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
@@ -134,6 +158,9 @@ int main(int argc, char** argv) {
 #else
 #error Target architecture was not detected as supported by Double-Conversion.
 #endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(CORRECT_DOUBLE_OPERATIONS)
+#define CORRECT_DOUBLE_OPERATIONS DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS
+#endif
 
 #if defined(_WIN32) && !defined(__MINGW32__)
 
@@ -159,7 +186,9 @@ typedef uint16_t uc16;
 // Usage: instead of writing 0x1234567890123456
 //      write DOUBLE_CONVERSION_UINT64_2PART_C(0x12345678,90123456);
 #define DOUBLE_CONVERSION_UINT64_2PART_C(a, b) (((static_cast<uint64_t>(a) << 32) + 0x##b##u))
-
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(UINT64_2PART_C)
+#define UINT64_2PART_C DOUBLE_CONVERSION_UINT64_2PART_C
+#endif
 
 // The expression DOUBLE_CONVERSION_ARRAY_SIZE(a) is a compile-time constant of type
 // size_t which represents the number of elements of the given
@@ -170,6 +199,9 @@ typedef uint16_t uc16;
   ((sizeof(a) / sizeof(*(a))) /                         \
   static_cast<size_t>(!(sizeof(a) % sizeof(*(a)))))
 #endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(ARRAY_SIZE)
+#define ARRAY_SIZE DOUBLE_CONVERSION_ARRAY_SIZE
+#endif
 
 // A macro to disallow the evil copy constructor and operator= functions
 // This should be used in the private: declarations for a class
@@ -178,6 +210,9 @@ typedef uint16_t uc16;
   TypeName(const TypeName&);                    \
   void operator=(const TypeName&)
 #endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(DC_DISALLOW_COPY_AND_ASSIGN)
+#define DC_DISALLOW_COPY_AND_ASSIGN DOUBLE_CONVERSION_DISALLOW_COPY_AND_ASSIGN
+#endif
 
 // A macro to disallow all the implicit constructors, namely the
 // default constructor, copy constructor and operator= functions.
@@ -190,6 +225,9 @@ typedef uint16_t uc16;
   TypeName();                                    \
   DOUBLE_CONVERSION_DISALLOW_COPY_AND_ASSIGN(TypeName)
 #endif
+#if defined(DOUBLE_CONVERSION_NON_PREFIXED_MACROS) && !defined(DC_DISALLOW_IMPLICIT_CONSTRUCTORS)
+#define DC_DISALLOW_IMPLICIT_CONSTRUCTORS DOUBLE_CONVERSION_DISALLOW_IMPLICIT_CONSTRUCTORS
+#endif
 
 namespace double_conversion {
 
index b6e82b4a7f8e7a1bf2a4bcd4b0a8286b435204a1..7d4526ba276e206b1dee79378a8386f2381c7a90 100644 (file)
@@ -75,6 +75,17 @@ static void PrintTestList(CcTest* current) {
 int main(int argc, char* argv[]) {
   int tests_run = 0;
   bool print_run_count = true;
+  if (argc == 1) {
+    // Just run all the tests.
+    CcTest* test = CcTest::last();
+    while (test != NULL) {
+      if (test->enabled()) {
+        test->Run();
+        tests_run++;
+      }
+      test = test->prev();
+    }
+  }
   for (int i = 1; i < argc; i++) {
     char* arg = argv[i];
     if (strcmp(arg, "--list") == 0) {