Commit 4ecbc7cf authored by jameslahm's avatar jameslahm Committed by V8 LUCI CQ

[test] Move cctest/test-diy-fp to unittests/numbers/

... diy-fp-unittest.

Bug: v8:12781
Change-Id: I7cb996c095ec0c946ed2db311dfd815e1cbd459b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3676643Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80831}
parent df89f11a
......@@ -191,7 +191,6 @@ v8_source_set("cctest_sources") {
"test-dictionary.cc",
"test-disasm-regex-helper.cc",
"test-disasm-regex-helper.h",
"test-diy-fp.cc",
"test-factory.cc",
"test-feedback-vector.cc",
"test-feedback-vector.h",
......
......@@ -395,6 +395,7 @@ v8_source_set("unittests_sources") {
"logging/log-unittest.cc",
"numbers/bigint-unittest.cc",
"numbers/conversions-unittest.cc",
"numbers/diy-fp-unittest.cc",
"numbers/strtod-unittest.cc",
"objects/array-list-unittest.cc",
"objects/concurrent-descriptor-array-unittest.cc",
......
......@@ -25,17 +25,21 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "src/base/numbers/diy-fp.h"
#include <stdlib.h>
#include "src/base/numbers/diy-fp.h"
#include "src/base/platform/platform.h"
#include "src/init/v8.h"
#include "test/cctest/cctest.h"
#include "test/unittests/test-utils.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace v8 {
namespace base {
TEST(Subtract) {
using DiyFpTest = ::testing::Test;
TEST_F(DiyFpTest, Subtract) {
DiyFp diy_fp1 = DiyFp(3, 0);
DiyFp diy_fp2 = DiyFp(1, 0);
DiyFp diff = DiyFp::Minus(diy_fp1, diy_fp2);
......@@ -47,8 +51,7 @@ TEST(Subtract) {
CHECK_EQ(0, diy_fp1.e());
}
TEST(Multiply) {
TEST_F(DiyFpTest, Multiply) {
DiyFp diy_fp1 = DiyFp(3, 0);
DiyFp diy_fp2 = DiyFp(2, 0);
DiyFp product = DiyFp::Times(diy_fp1, diy_fp2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment