1 /* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #include "big_integer.h" 17 18 #include <gtest/gtest.h> 19 20 #include <climits> 21 #include <string> 22 23 using namespace testing::ext; 24 using namespace OHOS::NativeRdb; 25 namespace Test { 26 class BigIntegerTest : public testing::Test { 27 public: 28 static void SetUpTestCase(void); 29 static void TearDownTestCase(void); SetUp(void)30 void SetUp(void){}; TearDown(void)31 void TearDown(void){}; 32 }; 33 SetUpTestCase(void)34void BigIntegerTest::SetUpTestCase(void) 35 { 36 } 37 TearDownTestCase(void)38void BigIntegerTest::TearDownTestCase(void) 39 { 40 } 41 42 /** 43 * @tc.name: RdbStore_SqliteUtils_001 44 * @tc.desc: test func third line 45 bool BigInteger::operator==(const BigInteger& other) 46 { 47 if (sign_ != other.sign_) { 48 return false; 49 } 50 return value_ == other.value_; 51 } 52 * @tc.type: FUNC 53 */ 54 HWTEST_F(BigIntegerTest, Big_Integer_001, TestSize.Level1) 55 { 56 BigInteger bigInt1 = BigInteger(100); 57 BigInteger bigInt2 = BigInteger(-100); 58 EXPECT_FALSE(bigInt1 == bigInt2); 59 } 60 } // namespace Test 61