[all-commits] [llvm/llvm-project] 3d758e: [libc] Move FPExceptMatcher out of TestHelpers.h

Siva Chandra via All-commits all-commits at lists.llvm.org
Fri Jul 30 16:44:45 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3d758e68a766545db0cc92d177d309f0616a67f4
      https://github.com/llvm/llvm-project/commit/3d758e68a766545db0cc92d177d309f0616a67f4
  Author: Siva Chandra Reddy <sivachandra at google.com>
  Date:   2021-07-30 (Fri, 30 Jul 2021)

  Changed paths:
    M libc/test/src/fenv/enabled_exceptions_test.cpp
    M libc/test/src/fenv/feholdexcept_test.cpp
    M libc/utils/FPUtil/CMakeLists.txt
    A libc/utils/FPUtil/FPExceptMatcher.cpp
    A libc/utils/FPUtil/FPExceptMatcher.h
    M libc/utils/FPUtil/TestHelpers.cpp
    M libc/utils/FPUtil/TestHelpers.h

  Log Message:
  -----------
  [libc] Move FPExceptMatcher out of TestHelpers.h

TestHelpers.h pulls few pieces from LLVM libc's unittest framework
which aren't available on platforms like Fuchsia which use their own
unittest framework. So, by moving FPExceptMatcher to a different file
we can exclude LLVM libc specific pieces in a cleaner way.

In a later pass, it might make more sense to rename TestHelpers.h also
to FPMatcher.h. That way, we can make macros like EXPECT_FP_EQ to be
equivalent to EXPECT_EQ on platforms like Fuchsia.

Reviewed By: michaelrj

Differential Revision: https://reviews.llvm.org/D107129




More information about the All-commits mailing list