• Home
  • Raw
  • Download

Lines Matching refs:BigInt

64     JSHandle<BigInt> bigint1 = BigIntHelper::SetBigInt(thread, str1);  in HWTEST_F_L0()
65 JSHandle<BigInt> bigint2 = BigIntHelper::SetBigInt(thread, str2); in HWTEST_F_L0()
66 JSHandle<BigInt> bigint3 = BigIntHelper::SetBigInt(thread, str3); in HWTEST_F_L0()
67 JSHandle<BigInt> bigint4 = BigIntHelper::SetBigInt(thread, str4); in HWTEST_F_L0()
68 …EXPECT_EQ(BigInt::Compare(bigint1.GetTaggedValue(), bigint1.GetTaggedValue()), ComparisonResult::E… in HWTEST_F_L0()
69 …EXPECT_EQ(BigInt::Compare(bigint3.GetTaggedValue(), bigint2.GetTaggedValue()), ComparisonResult::L… in HWTEST_F_L0()
70 …EXPECT_EQ(BigInt::Compare(bigint1.GetTaggedValue(), bigint2.GetTaggedValue()), ComparisonResult::L… in HWTEST_F_L0()
71 …EXPECT_EQ(BigInt::Compare(bigint2.GetTaggedValue(), bigint1.GetTaggedValue()), ComparisonResult::G… in HWTEST_F_L0()
72 …EXPECT_EQ(BigInt::Compare(bigint2.GetTaggedValue(), bigint3.GetTaggedValue()), ComparisonResult::G… in HWTEST_F_L0()
73 …EXPECT_EQ(BigInt::Compare(bigint3.GetTaggedValue(), bigint4.GetTaggedValue()), ComparisonResult::L… in HWTEST_F_L0()
74 …EXPECT_EQ(BigInt::Compare(bigint4.GetTaggedValue(), bigint3.GetTaggedValue()), ComparisonResult::G… in HWTEST_F_L0()
76 JSHandle<BigInt> zero = BigInt::Uint32ToBigInt(thread, 0); in HWTEST_F_L0()
77 …EXPECT_EQ(BigInt::Compare(zero.GetTaggedValue(), bigint1.GetTaggedValue()), ComparisonResult::LESS… in HWTEST_F_L0()
78 …EXPECT_EQ(BigInt::Compare(bigint1.GetTaggedValue(), zero.GetTaggedValue()), ComparisonResult::GREA… in HWTEST_F_L0()
79 … EXPECT_EQ(BigInt::Compare(zero.GetTaggedValue(), zero.GetTaggedValue()), ComparisonResult::EQUAL); in HWTEST_F_L0()
80 …EXPECT_EQ(BigInt::Compare(zero.GetTaggedValue(), bigint3.GetTaggedValue()), ComparisonResult::GREA… in HWTEST_F_L0()
81 …EXPECT_EQ(BigInt::Compare(bigint3.GetTaggedValue(), zero.GetTaggedValue()), ComparisonResult::LESS… in HWTEST_F_L0()
93 JSHandle<BigInt> bigint = BigInt::CreateBigint(thread, size); in HWTEST_F_L0()
108 JSHandle<BigInt> maxSafeInt = BigIntHelper::SetBigInt(thread, maxSafeIntStr); in HWTEST_F_L0()
109 JSHandle<BigInt> minSafeInt = BigIntHelper::SetBigInt(thread, minSafeIntStr); in HWTEST_F_L0()
112 JSHandle<BigInt> minusMinSafeInt = BigInt::UnaryMinus(thread, minSafeInt); in HWTEST_F_L0()
113 JSHandle<BigInt> minusMaxSafeInt = BigInt::UnaryMinus(thread, maxSafeInt); in HWTEST_F_L0()
114 bool result1 = BigInt::Equal(maxSafeInt.GetTaggedValue(), minSafeInt.GetTaggedValue()); in HWTEST_F_L0()
115 bool result2 = BigInt::SameValue(maxSafeInt.GetTaggedValue(), minSafeInt.GetTaggedValue()); in HWTEST_F_L0()
116 bool result3 = BigInt::SameValueZero(maxSafeInt.GetTaggedValue(), minSafeInt.GetTaggedValue()); in HWTEST_F_L0()
120 result1 = BigInt::Equal(maxSafeInt.GetTaggedValue(), minusMinSafeInt.GetTaggedValue()); in HWTEST_F_L0()
121 result2 = BigInt::SameValue(maxSafeInt.GetTaggedValue(), minusMinSafeInt.GetTaggedValue()); in HWTEST_F_L0()
122 result3 = BigInt::SameValueZero(maxSafeInt.GetTaggedValue(), minusMinSafeInt.GetTaggedValue()); in HWTEST_F_L0()
126 result1 = BigInt::Equal(minSafeInt.GetTaggedValue(), minusMaxSafeInt.GetTaggedValue()); in HWTEST_F_L0()
127 result2 = BigInt::SameValue(minSafeInt.GetTaggedValue(), minusMaxSafeInt.GetTaggedValue()); in HWTEST_F_L0()
128 result3 = BigInt::SameValueZero(minSafeInt.GetTaggedValue(), minusMaxSafeInt.GetTaggedValue()); in HWTEST_F_L0()
136 JSHandle<BigInt> unsafeInt1 = BigIntHelper::SetBigInt(thread, unsafeIntStr1); in HWTEST_F_L0()
137 JSHandle<BigInt> unsafeInt2 = BigIntHelper::SetBigInt(thread, unsafeIntStr2); in HWTEST_F_L0()
138 JSHandle<BigInt> minusUnsafeInt1 = BigInt::UnaryMinus(thread, unsafeInt1); in HWTEST_F_L0()
139 result1 = BigInt::Equal(unsafeInt2.GetTaggedValue(), minusUnsafeInt1.GetTaggedValue()); in HWTEST_F_L0()
140 result2 = BigInt::SameValue(unsafeInt2.GetTaggedValue(), minusUnsafeInt1.GetTaggedValue()); in HWTEST_F_L0()
141 result3 = BigInt::SameValueZero(unsafeInt2.GetTaggedValue(), minusUnsafeInt1.GetTaggedValue()); in HWTEST_F_L0()
156 JSHandle<BigInt> maxSafeIntPlusOne = BigIntHelper::SetBigInt(thread, maxSafeIntPlusOneStr); in HWTEST_F_L0()
186 JSHandle<BigInt> maxSafeInt = BigIntHelper::SetBigInt(thread, maxSafeIntStr, BigInt::BINARY); in HWTEST_F_L0()
187 …JSHandle<BigInt> maxSafeIntPlusOne = BigIntHelper::SetBigInt(thread, maxSafeIntPlusOneStr, BigInt:… in HWTEST_F_L0()
188 JSHandle<BigInt> bigint1 = BigIntHelper::SetBigInt(thread, bigintStr1, BigInt::BINARY); in HWTEST_F_L0()
189 JSHandle<BigInt> bigint2 = BigIntHelper::SetBigInt(thread, bigintStr2, BigInt::BINARY); in HWTEST_F_L0()
190 JSHandle<BigInt> bigint3 = BigInt::UnaryMinus(thread, bigint2); in HWTEST_F_L0()
191 JSHandle<BigInt> bigint4 = BigInt::UnaryMinus(thread, bigint1); in HWTEST_F_L0()
193 JSHandle<BigInt> addOpRes = BigInt::BitwiseOp(thread, Operate::AND, maxSafeIntPlusOne, bigint1); in HWTEST_F_L0()
194 JSHandle<BigInt> andRes = BigInt::BitwiseAND(thread, maxSafeIntPlusOne, bigint1); in HWTEST_F_L0()
195 EXPECT_TRUE(BigInt::Equal(addOpRes.GetTaggedValue(), maxSafeIntPlusOne.GetTaggedValue())); in HWTEST_F_L0()
196 EXPECT_TRUE(BigInt::Equal(andRes.GetTaggedValue(), maxSafeIntPlusOne.GetTaggedValue())); in HWTEST_F_L0()
198 JSHandle<BigInt> addOpRes1 = BigInt::BitwiseOp(thread, Operate::AND, bigint1, bigint2); in HWTEST_F_L0()
199 JSHandle<BigInt> andRes1 = BigInt::BitwiseAND(thread, bigint1, bigint2); in HWTEST_F_L0()
200 EXPECT_TRUE(BigInt::Equal(addOpRes1.GetTaggedValue(), bigint2.GetTaggedValue())); in HWTEST_F_L0()
201 EXPECT_TRUE(BigInt::Equal(andRes1.GetTaggedValue(), bigint2.GetTaggedValue())); in HWTEST_F_L0()
203 JSHandle<BigInt> addOpRes2 = BigInt::BitwiseOp(thread, Operate::AND, bigint2, bigint1); in HWTEST_F_L0()
204 JSHandle<BigInt> andRes2 = BigInt::BitwiseAND(thread, bigint2, bigint1); in HWTEST_F_L0()
205 EXPECT_TRUE(BigInt::Equal(addOpRes2.GetTaggedValue(), bigint2.GetTaggedValue())); in HWTEST_F_L0()
206 EXPECT_TRUE(BigInt::Equal(andRes2.GetTaggedValue(), bigint2.GetTaggedValue())); in HWTEST_F_L0()
209 JSHandle<BigInt> bigint = BigIntHelper::SetBigInt(thread, bigintStr4, BigInt::BINARY); in HWTEST_F_L0()
210 JSHandle<BigInt> andRes3 = BigInt::BitwiseAND(thread, bigint3, bigint1); in HWTEST_F_L0()
211 EXPECT_TRUE(BigInt::Equal(andRes3.GetTaggedValue(), bigint.GetTaggedValue())); in HWTEST_F_L0()
213 JSHandle<BigInt> andRes4 = BigInt::BitwiseAND(thread, bigint1, bigint3); in HWTEST_F_L0()
214 EXPECT_TRUE(BigInt::Equal(andRes4.GetTaggedValue(), bigint.GetTaggedValue())); in HWTEST_F_L0()
217 JSHandle<BigInt> bigint5 = BigIntHelper::SetBigInt(thread, bigintStr5, BigInt::BINARY); in HWTEST_F_L0()
218 JSHandle<BigInt> andRes5 = BigInt::BitwiseAND(thread, bigint3, bigint4); in HWTEST_F_L0()
219 EXPECT_TRUE(BigInt::Equal(andRes5.GetTaggedValue(), bigint5.GetTaggedValue())); in HWTEST_F_L0()
222 JSHandle<BigInt> bigint6 = BigIntHelper::SetBigInt(thread, bigintStr6, BigInt::BINARY); in HWTEST_F_L0()
223 JSHandle<BigInt> andRes6 = BigInt::BitwiseAND(thread, bigint4, bigint3); in HWTEST_F_L0()
224 EXPECT_TRUE(BigInt::Equal(andRes6.GetTaggedValue(), bigint6.GetTaggedValue())); in HWTEST_F_L0()
227 … JSHandle<BigInt> orOpRes = BigInt::BitwiseOp(thread, Operate::OR, maxSafeInt, maxSafeIntPlusOne); in HWTEST_F_L0()
228 JSHandle<BigInt> orRes = BigInt::BitwiseOR(thread, maxSafeInt, maxSafeIntPlusOne); in HWTEST_F_L0()
229 EXPECT_TRUE(BigInt::Equal(orOpRes.GetTaggedValue(), bigint1.GetTaggedValue())); in HWTEST_F_L0()
230 EXPECT_TRUE(BigInt::Equal(orRes.GetTaggedValue(), bigint1.GetTaggedValue())); in HWTEST_F_L0()
232 JSHandle<BigInt> orRes1 = BigInt::BitwiseOR(thread, bigint3, maxSafeIntPlusOne); in HWTEST_F_L0()
233 EXPECT_TRUE(BigInt::Equal(orRes1.GetTaggedValue(), bigint3.GetTaggedValue())); in HWTEST_F_L0()
235 JSHandle<BigInt> orRes2 = BigInt::BitwiseOR(thread, maxSafeIntPlusOne, bigint3); in HWTEST_F_L0()
236 EXPECT_TRUE(BigInt::Equal(orRes2.GetTaggedValue(), bigint3.GetTaggedValue())); in HWTEST_F_L0()
239 JSHandle<BigInt> bigint7 = BigIntHelper::SetBigInt(thread, bigintStr7, BigInt::BINARY); in HWTEST_F_L0()
240 JSHandle<BigInt> orRes3 = BigInt::BitwiseOR(thread, bigint3, bigint4); in HWTEST_F_L0()
241 EXPECT_TRUE(BigInt::Equal(orRes3.GetTaggedValue(), bigint7.GetTaggedValue())); in HWTEST_F_L0()
244 JSHandle<BigInt> xorOpRes = BigInt::BitwiseOp(thread, Operate::XOR, maxSafeIntPlusOne, bigint1); in HWTEST_F_L0()
245 JSHandle<BigInt> xorRes = BigInt::BitwiseXOR(thread, maxSafeIntPlusOne, bigint1); in HWTEST_F_L0()
246 EXPECT_TRUE(BigInt::Equal(xorOpRes.GetTaggedValue(), maxSafeInt.GetTaggedValue())); in HWTEST_F_L0()
247 EXPECT_TRUE(BigInt::Equal(xorRes.GetTaggedValue(), maxSafeInt.GetTaggedValue())); in HWTEST_F_L0()
250 JSHandle<BigInt> bigint8 = BigIntHelper::SetBigInt(thread, bigintStr8, BigInt::BINARY); in HWTEST_F_L0()
251 JSHandle<BigInt> xorRes1 = BigInt::BitwiseXOR(thread, bigint3, maxSafeIntPlusOne); in HWTEST_F_L0()
252 EXPECT_TRUE(BigInt::Equal(xorRes1.GetTaggedValue(), bigint8.GetTaggedValue())); in HWTEST_F_L0()
254 JSHandle<BigInt> xorRes2 = BigInt::BitwiseXOR(thread, maxSafeIntPlusOne, bigint3); in HWTEST_F_L0()
255 EXPECT_TRUE(BigInt::Equal(xorRes2.GetTaggedValue(), bigint8.GetTaggedValue())); in HWTEST_F_L0()
258 JSHandle<BigInt> bigint9 = BigIntHelper::SetBigInt(thread, bigintStr9, BigInt::BINARY); in HWTEST_F_L0()
259 JSHandle<BigInt> xorRes3 = BigInt::BitwiseXOR(thread, bigint3, bigint4); in HWTEST_F_L0()
260 EXPECT_TRUE(BigInt::Equal(xorRes3.GetTaggedValue(), bigint9.GetTaggedValue())); in HWTEST_F_L0()
263 JSHandle<BigInt> notRes1 = BigInt::BitwiseNOT(thread, maxSafeInt); in HWTEST_F_L0()
264 JSHandle<BigInt> minusMaxSafeInt = BigInt::UnaryMinus(thread, maxSafeIntPlusOne); in HWTEST_F_L0()
266 EXPECT_TRUE(BigInt::Equal(notRes1.GetTaggedValue(), minusMaxSafeInt.GetTaggedValue())); in HWTEST_F_L0()
267 JSHandle<BigInt> notRes2 = BigInt::BitwiseNOT(thread, minusMaxSafeInt); in HWTEST_F_L0()
269 EXPECT_TRUE(BigInt::Equal(notRes2.GetTaggedValue(), maxSafeInt.GetTaggedValue())); in HWTEST_F_L0()
273 JSHandle<BigInt> subOneRes = BigInt::BitwiseSubOne(thread, maxSafeIntPlusOne, maxSize); in HWTEST_F_L0()
274 EXPECT_TRUE(BigInt::Equal(subOneRes.GetTaggedValue(), maxSafeInt.GetTaggedValue())); in HWTEST_F_L0()
277 JSHandle<BigInt> addOneRes = BigInt::BitwiseAddOne(thread, maxSafeInt); in HWTEST_F_L0()
278 JSHandle<BigInt> minusMaxSafePlusOneInt = BigInt::UnaryMinus(thread, maxSafeIntPlusOne); in HWTEST_F_L0()
279 EXPECT_TRUE(BigInt::Equal(addOneRes.GetTaggedValue(), minusMaxSafePlusOneInt.GetTaggedValue())); in HWTEST_F_L0()
281 JSHandle<BigInt> newBigint = BigInt::CreateBigint(thread, 2); in HWTEST_F_L0()
284 JSHandle<BigInt> addOneRes1 = BigInt::BitwiseAddOne(thread, newBigint); in HWTEST_F_L0()
286 JSHandle<BigInt> newBigint1 = BigInt::CreateBigint(thread, 3); in HWTEST_F_L0()
290 EXPECT_TRUE(BigInt::Equal(addOneRes1.GetTaggedValue(), newBigint1.GetTaggedValue())); in HWTEST_F_L0()
303 JSHandle<BigInt> bigint1 = BigIntHelper::SetBigInt(thread, bigintStdStr1, BigInt::BINARY); in HWTEST_F_L0()
304 JSHandle<BigInt> bigint2 = BigIntHelper::SetBigInt(thread, bigintStdStr2, BigInt::DECIMAL); in HWTEST_F_L0()
306 JSHandle<EcmaString> bigintEcmaStrBin1 = BigInt::ToString(thread, bigint1, BigInt::BINARY); in HWTEST_F_L0()
309 JSHandle<EcmaString> bigintEcmaStrOct1 = BigInt::ToString(thread, bigint1, BigInt::OCTAL); in HWTEST_F_L0()
311 JSHandle<EcmaString> bigintEcmaStrDec1 = BigInt::ToString(thread, bigint1, BigInt::DECIMAL); in HWTEST_F_L0()
313 JSHandle<EcmaString> bigintEcmaStrHex1 = BigInt::ToString(thread, bigint1, BigInt::HEXADECIMAL); in HWTEST_F_L0()
316 JSHandle<EcmaString> bigintEcmaStrBin2 = BigInt::ToString(thread, bigint2, BigInt::BINARY); in HWTEST_F_L0()
320 (bigint2->ToStdString(BigInt::BINARY)).c_str()); in HWTEST_F_L0()
322 JSHandle<EcmaString> bigintEcmaStrOct2 = BigInt::ToString(thread, bigint2, BigInt::OCTAL); in HWTEST_F_L0()
325 (bigint2->ToStdString(BigInt::OCTAL)).c_str()); in HWTEST_F_L0()
327 JSHandle<EcmaString> bigintEcmaStrDec2 = BigInt::ToString(thread, bigint2, BigInt::DECIMAL); in HWTEST_F_L0()
330 (bigint2->ToStdString(BigInt::DECIMAL)).c_str()); in HWTEST_F_L0()
332 JSHandle<EcmaString> bigintEcmaStrHex2 = BigInt::ToString(thread, bigint2, BigInt::HEXADECIMAL); in HWTEST_F_L0()
335 (bigint2->ToStdString(BigInt::HEXADECIMAL)).c_str()); in HWTEST_F_L0()
350 JSHandle<BigInt> maxSafeInt = BigIntHelper::SetBigInt(thread, maxSafeIntStr); in HWTEST_F_L0()
351 JSHandle<BigInt> minSafeInt = BigIntHelper::SetBigInt(thread, minSafeIntStr); in HWTEST_F_L0()
352 JSHandle<BigInt> maxSafeIntPlusOne = BigIntHelper::SetBigInt(thread, maxSafeIntPlusOneStr); in HWTEST_F_L0()
353 JSHandle<BigInt> minSafeIntSubOne = BigIntHelper::SetBigInt(thread, minSafeIntSubOneStr); in HWTEST_F_L0()
355 JSHandle<BigInt> minusRes1 = BigInt::UnaryMinus(thread, maxSafeInt); in HWTEST_F_L0()
356 EXPECT_TRUE(BigInt::Equal(minusRes1.GetTaggedValue(), minSafeInt.GetTaggedValue())); in HWTEST_F_L0()
357 JSHandle<BigInt> minusRes2 = BigInt::UnaryMinus(thread, minSafeInt); in HWTEST_F_L0()
358 EXPECT_TRUE(BigInt::Equal(minusRes2.GetTaggedValue(), maxSafeInt.GetTaggedValue())); in HWTEST_F_L0()
359 JSHandle<BigInt> minusRes3 = BigInt::UnaryMinus(thread, maxSafeIntPlusOne); in HWTEST_F_L0()
360 EXPECT_TRUE(BigInt::Equal(minusRes3.GetTaggedValue(), minSafeIntSubOne.GetTaggedValue())); in HWTEST_F_L0()
361 JSHandle<BigInt> minusRes4 = BigInt::UnaryMinus(thread, minSafeIntSubOne); in HWTEST_F_L0()
362 EXPECT_TRUE(BigInt::Equal(minusRes4.GetTaggedValue(), maxSafeIntPlusOne.GetTaggedValue())); in HWTEST_F_L0()
364 JSHandle<BigInt> zero = BigInt::Int32ToBigInt(thread, 0); in HWTEST_F_L0()
365 JSHandle<BigInt> minusRes5 = BigInt::UnaryMinus(thread, zero); in HWTEST_F_L0()
367 EXPECT_TRUE(BigInt::Equal(zero.GetTaggedValue(), minusRes5.GetTaggedValue())); in HWTEST_F_L0()
385 JSHandle<BigInt> baseBigint = BigIntHelper::SetBigInt(thread, baseBigintStr); in HWTEST_F_L0()
386 JSHandle<BigInt> expBigint1 = BigIntHelper::SetBigInt(thread, expBigintStr1); in HWTEST_F_L0()
387 JSHandle<BigInt> expBigint2 = BigIntHelper::SetBigInt(thread, expBigintStr2); in HWTEST_F_L0()
388 JSHandle<BigInt> resBigint1 = BigIntHelper::SetBigInt(thread, resBigintStr1); in HWTEST_F_L0()
389 JSHandle<BigInt> resBigint2 = BigIntHelper::SetBigInt(thread, resBigintStr2); in HWTEST_F_L0()
390 JSHandle<BigInt> resBigint3 = BigIntHelper::SetBigInt(thread, resBigintStr3); in HWTEST_F_L0()
391 JSHandle<BigInt> resBigint4 = BigIntHelper::SetBigInt(thread, resBigintStr4); in HWTEST_F_L0()
392 JSHandle<BigInt> resBigint5 = BigInt::Int32ToBigInt(thread, -1); in HWTEST_F_L0()
393 JSHandle<BigInt> zero = BigInt::Int32ToBigInt(thread, 0); in HWTEST_F_L0()
395 JSHandle<BigInt> expRes1 = BigInt::Exponentiate(thread, baseBigint, expBigint1); in HWTEST_F_L0()
396 EXPECT_TRUE(BigInt::Equal(expRes1.GetTaggedValue(), resBigint1.GetTaggedValue())); in HWTEST_F_L0()
397 JSHandle<BigInt> expRes2 = BigInt::Exponentiate(thread, baseBigint, expBigint2); in HWTEST_F_L0()
398 EXPECT_TRUE(BigInt::Equal(expRes2.GetTaggedValue(), resBigint2.GetTaggedValue())); in HWTEST_F_L0()
399 JSHandle<BigInt> expRes3 = BigInt::Exponentiate(thread, baseBigint, resBigint5); in HWTEST_F_L0()
403 JSHandle<BigInt> mulRes1 = BigInt::Multiply(thread, baseBigint, baseBigint); in HWTEST_F_L0()
405 mulRes1 = BigInt::Multiply(thread, mulRes1, baseBigint); in HWTEST_F_L0()
407 EXPECT_TRUE(BigInt::Equal(mulRes1.GetTaggedValue(), resBigint1.GetTaggedValue())); in HWTEST_F_L0()
408 JSHandle<BigInt> mulRes2 = BigInt::Multiply(thread, baseBigint, baseBigint); in HWTEST_F_L0()
410 mulRes2 = BigInt::Multiply(thread, mulRes2, baseBigint); in HWTEST_F_L0()
412 EXPECT_TRUE(BigInt::Equal(mulRes2.GetTaggedValue(), resBigint2.GetTaggedValue())); in HWTEST_F_L0()
413 JSHandle<BigInt> mulRes3 = BigInt::Multiply(thread, resBigint1, resBigint2); in HWTEST_F_L0()
414 EXPECT_TRUE(BigInt::Equal(mulRes3.GetTaggedValue(), resBigint3.GetTaggedValue())); in HWTEST_F_L0()
418 JSHandle<BigInt> divRes1 = BigInt::Divide(thread, resBigint3, resBigint2); in HWTEST_F_L0()
419 EXPECT_TRUE(BigInt::Equal(divRes1.GetTaggedValue(), resBigint1.GetTaggedValue())); in HWTEST_F_L0()
420 JSHandle<BigInt> divRes2 = BigInt::Divide(thread, resBigint3, resBigint1); in HWTEST_F_L0()
421 EXPECT_TRUE(BigInt::Equal(divRes2.GetTaggedValue(), resBigint2.GetTaggedValue())); in HWTEST_F_L0()
423 JSHandle<BigInt> divRes3 = BigInt::Divide(thread, resBigint4, resBigint1); in HWTEST_F_L0()
424 EXPECT_TRUE(BigInt::Equal(divRes3.GetTaggedValue(), resBigint2.GetTaggedValue())); in HWTEST_F_L0()
425 JSHandle<BigInt> divRes4 = BigInt::Divide(thread, resBigint4, resBigint2); in HWTEST_F_L0()
426 EXPECT_TRUE(BigInt::Equal(divRes4.GetTaggedValue(), resBigint1.GetTaggedValue())); in HWTEST_F_L0()
427 JSHandle<BigInt> divRes5 = BigInt::Divide(thread, baseBigint, zero); in HWTEST_F_L0()
430 JSHandle<BigInt> divRes6 = BigInt::Divide(thread, expBigint2, baseBigint); in HWTEST_F_L0()
431 …JSHandle<BigInt> expectRes6 = BigInt::Int32ToBigInt(thread, 27); // 27 : Expected calculation resu… in HWTEST_F_L0()
432 EXPECT_TRUE(BigInt::Equal(divRes6.GetTaggedValue(), expectRes6.GetTaggedValue())); in HWTEST_F_L0()
433 JSHandle<BigInt> divRes7 = BigInt::Divide(thread, expBigint1, baseBigint); in HWTEST_F_L0()
434 …JSHandle<BigInt> expectRes7 = BigInt::Int32ToBigInt(thread, 26); // 26 : Expected calculation resu… in HWTEST_F_L0()
435 EXPECT_TRUE(BigInt::Equal(divRes7.GetTaggedValue(), expectRes7.GetTaggedValue())); in HWTEST_F_L0()
438 JSHandle<BigInt> remRes1 = BigInt::Remainder(thread, resBigint4, resBigint1); in HWTEST_F_L0()
439 EXPECT_TRUE(BigInt::Equal(remRes1.GetTaggedValue(), expBigint2.GetTaggedValue())); in HWTEST_F_L0()
440 JSHandle<BigInt> remRes2 = BigInt::Remainder(thread, resBigint4, resBigint2); in HWTEST_F_L0()
441 EXPECT_TRUE(BigInt::Equal(remRes2.GetTaggedValue(), expBigint2.GetTaggedValue())); in HWTEST_F_L0()
442 JSHandle<BigInt> remRes3 = BigInt::Remainder(thread, resBigint4, resBigint3); in HWTEST_F_L0()
443 EXPECT_TRUE(BigInt::Equal(remRes3.GetTaggedValue(), expBigint2.GetTaggedValue())); in HWTEST_F_L0()
444 JSHandle<BigInt> remRes4 = BigInt::Remainder(thread, baseBigint, zero); in HWTEST_F_L0()
447 JSHandle<BigInt> remRes5 = BigInt::Remainder(thread, expBigint2, baseBigint); in HWTEST_F_L0()
448 EXPECT_TRUE(BigInt::Equal(remRes5.GetTaggedValue(), zero.GetTaggedValue())); in HWTEST_F_L0()
449 JSHandle<BigInt> remRes6 = BigInt::Remainder(thread, expBigint1, baseBigint); in HWTEST_F_L0()
450 JSHandle<BigInt> expect = BigInt::Int32ToBigInt(thread, 1); in HWTEST_F_L0()
451 EXPECT_TRUE(BigInt::Equal(remRes6.GetTaggedValue(), expect.GetTaggedValue())); in HWTEST_F_L0()
468 JSHandle<BigInt> resBigint1 = BigIntHelper::SetBigInt(thread, resBigintStr1); in HWTEST_F_L0()
469 JSHandle<BigInt> resBigint2 = BigIntHelper::SetBigInt(thread, resBigintStr2); in HWTEST_F_L0()
470 JSHandle<BigInt> resBigint3 = BigIntHelper::SetBigInt(thread, resBigintStr3); in HWTEST_F_L0()
471 JSHandle<BigInt> resBigint4 = BigIntHelper::SetBigInt(thread, resBigintStr4); in HWTEST_F_L0()
472 JSHandle<BigInt> resBigint5 = BigIntHelper::SetBigInt(thread, resBigintStr5); in HWTEST_F_L0()
493 JSHandle<BigInt> resBigint1 = BigIntHelper::SetBigInt(thread, resBigintStr1); in HWTEST_F_L0()
494 JSHandle<BigInt> resBigint2 = BigIntHelper::SetBigInt(thread, resBigintStr2); in HWTEST_F_L0()
495 JSHandle<BigInt> resBigint3 = BigIntHelper::SetBigInt(thread, resBigintStr3); in HWTEST_F_L0()
511 JSHandle<BigInt> resBigint1 = BigInt::Int64ToBigInt(thread, LLONG_MAX); in HWTEST_F_L0()
512 JSHandle<BigInt> resBigint2 = BigInt::Int64ToBigInt(thread, LLONG_MIN); in HWTEST_F_L0()
513 JSHandle<BigInt> resBigint3 = BigInt::Int64ToBigInt(thread, INT_MAX); in HWTEST_F_L0()
514 JSHandle<BigInt> resBigint4 = BigInt::Int64ToBigInt(thread, INT_MIN); in HWTEST_F_L0()
515 JSHandle<BigInt> resBigint5 = BigInt::Int64ToBigInt(thread, 0); in HWTEST_F_L0()
532 JSHandle<BigInt> resBigint1 = BigInt::Uint64ToBigInt(thread, ULLONG_MAX); in HWTEST_F_L0()
533 JSHandle<BigInt> resBigint2 = BigInt::Uint64ToBigInt(thread, UINT_MAX); in HWTEST_F_L0()
534 JSHandle<BigInt> resBigint3 = BigInt::Uint64ToBigInt(thread, 0); in HWTEST_F_L0()
541 void GetWordsArray(bool *signBit, size_t wordCount, uint64_t *words, JSHandle<BigInt> bigintVal) in GetWordsArray()
569 JSHandle<BigInt> bigintFalse = BigInt::CreateBigWords(thread, false, wordCount, words); in HWTEST_F_L0()
578 JSHandle<BigInt> bigintTrue = BigInt::CreateBigWords(thread, true, wordCount, words); in HWTEST_F_L0()
587 JSHandle<BigInt> bigintFalse1 = BigInt::CreateBigWords(thread, false, wordCount1, words1); in HWTEST_F_L0()
599 JSHandle<BigInt> bigint1 = BigInt::CreateBigWords(thread, true, wordCount2, words2); in HWTEST_F_L0()
602 BigInt::CreateBigWords(thread, true, INT_MAX, words2); in HWTEST_F_L0()
615 JSHandle<BigInt> exponent = BigInt::Int32ToBigInt(thread, 64); // 64 : bits in HWTEST_F_L0()
616 JSHandle<BigInt> exponentone = BigInt::Int32ToBigInt(thread, 63); // 63 : bits in HWTEST_F_L0()
617 JSHandle<BigInt> base = BigInt::Int32ToBigInt(thread, 2); // 2 : base value in HWTEST_F_L0()
618 JSHandle<BigInt> uint64MaxBigint1 = BigInt::Exponentiate(thread, base, exponent); in HWTEST_F_L0()
619 JSHandle<BigInt> uint64MaxBigint2 = BigInt::GetUint64MaxBigint(thread); in HWTEST_F_L0()
620 … EXPECT_TRUE(BigInt::Equal(uint64MaxBigint1.GetTaggedValue(), uint64MaxBigint2.GetTaggedValue())); in HWTEST_F_L0()
621 JSHandle<BigInt> int64MaxBigint1 = BigInt::Exponentiate(thread, base, exponentone); in HWTEST_F_L0()
622 JSHandle<BigInt> int64MaxBigint2 = BigInt::GetInt64MaxBigint(thread); in HWTEST_F_L0()
623 EXPECT_TRUE(BigInt::Equal(int64MaxBigint1.GetTaggedValue(), int64MaxBigint2.GetTaggedValue())); in HWTEST_F_L0()
634 … JSHandle<BigInt> resBigint1 = BigInt::Int32ToBigInt(thread, std::numeric_limits<int32_t>::max()); in HWTEST_F_L0()
635 … JSHandle<BigInt> resBigint2 = BigInt::Int32ToBigInt(thread, std::numeric_limits<int32_t>::min()); in HWTEST_F_L0()
636 JSHandle<BigInt> resBigint3 = BigInt::Int32ToBigInt(thread, 0); in HWTEST_F_L0()
654 …JSHandle<BigInt> resBigint1 = BigInt::Uint32ToBigInt(thread, std::numeric_limits<uint32_t>::max()); in HWTEST_F_L0()
655 …JSHandle<BigInt> resBigint2 = BigInt::Uint32ToBigInt(thread, std::numeric_limits<uint32_t>::min()); in HWTEST_F_L0()
656 JSHandle<BigInt> resBigint3 = BigInt::Uint32ToBigInt(thread, 0); in HWTEST_F_L0()
674 JSHandle<BigInt> resBigint1 = BigInt::Int64ToBigInt(thread, LLONG_MAX); in HWTEST_F_L0()
675 JSHandle<BigInt> resBigint2 = BigInt::Int64ToBigInt(thread, LLONG_MIN); in HWTEST_F_L0()
676 JSHandle<BigInt> resBigint3 = BigInt::Int64ToBigInt(thread, INT_MAX); in HWTEST_F_L0()
677 JSHandle<BigInt> resBigint4 = BigInt::Int64ToBigInt(thread, INT_MIN); in HWTEST_F_L0()
678 JSHandle<BigInt> resBigint5 = BigInt::Int64ToBigInt(thread, 0); in HWTEST_F_L0()
681 BigInt::BigIntToInt64(thread, JSHandle<JSTaggedValue>(resBigint1), &cValue, &lossless); in HWTEST_F_L0()
684 BigInt::BigIntToInt64(thread, JSHandle<JSTaggedValue>(resBigint2), &cValue, &lossless); in HWTEST_F_L0()
687 BigInt::BigIntToInt64(thread, JSHandle<JSTaggedValue>(resBigint3), &cValue, &lossless); in HWTEST_F_L0()
690 BigInt::BigIntToInt64(thread, JSHandle<JSTaggedValue>(resBigint4), &cValue, &lossless); in HWTEST_F_L0()
693 BigInt::BigIntToInt64(thread, JSHandle<JSTaggedValue>(resBigint5), &cValue, &lossless); in HWTEST_F_L0()
697 JSHandle<BigInt> resBigint6 = BigInt::CreateBigint(thread, 3); // 3 : bigint length in HWTEST_F_L0()
702 BigInt::BigIntToInt64(thread, JSHandle<JSTaggedValue>(resBigint6), &cValue, &lossless); in HWTEST_F_L0()
708 BigInt::BigIntToInt64(thread, JSHandle<JSTaggedValue>(resBigint6), &cValue, &lossless); in HWTEST_F_L0()
721 JSHandle<BigInt> resBigint1 = BigInt::Uint64ToBigInt(thread, ULLONG_MAX); in HWTEST_F_L0()
722 JSHandle<BigInt> resBigint2 = BigInt::Uint64ToBigInt(thread, UINT_MAX); in HWTEST_F_L0()
723 JSHandle<BigInt> resBigint3 = BigInt::Uint64ToBigInt(thread, 0); in HWTEST_F_L0()
727 BigInt::BigIntToUint64(thread, JSHandle<JSTaggedValue>(resBigint1), &cValue, &lossless); in HWTEST_F_L0()
730 BigInt::BigIntToUint64(thread, JSHandle<JSTaggedValue>(resBigint2), &cValue, &lossless); in HWTEST_F_L0()
733 BigInt::BigIntToUint64(thread, JSHandle<JSTaggedValue>(resBigint3), &cValue, &lossless); in HWTEST_F_L0()
737 JSHandle<BigInt> resBigint4 = BigInt::CreateBigint(thread, 3); // 3 : bigint length in HWTEST_F_L0()
742 BigInt::BigIntToUint64(thread, JSHandle<JSTaggedValue>(resBigint4), &cValue, &lossless); in HWTEST_F_L0()
755 JSHandle<BigInt> resBigint = BigInt::CreateBigint(thread, 2); // 2 : bigint length in HWTEST_F_L0()
759 JSHandle<BigInt> resBigint1 = BigInt::CreateBigint(thread, 2); // 2 : bigint length in HWTEST_F_L0()
763 JSHandle<BigInt> addres = BigInt::Add(thread, resBigint, resBigint1); in HWTEST_F_L0()
766 JSHandle<BigInt> addres1 = BigInt::Add(thread, resBigint1, resBigint); in HWTEST_F_L0()
770 JSHandle<BigInt> resBigint2 = BigInt::Int32ToBigInt(thread, 1); in HWTEST_F_L0()
771 JSHandle<BigInt> addres2 = BigInt::Add(thread, resBigint2, resBigint); in HWTEST_F_L0()
776 JSHandle<BigInt> addres3 = BigInt::Add(thread, resBigint2, resBigint1); in HWTEST_F_L0()
790 JSHandle<BigInt> resBigint = BigInt::CreateBigint(thread, 2); // 2 : bigint length in HWTEST_F_L0()
793 JSHandle<BigInt> resBigint1 = BigInt::CreateBigint(thread, 2); // 2 : bigint length in HWTEST_F_L0()
797 JSHandle<BigInt> addres = BigInt::Subtract(thread, resBigint1, resBigint); in HWTEST_F_L0()
800 JSHandle<BigInt> addres1 = BigInt::Subtract(thread, resBigint1, resBigint); in HWTEST_F_L0()
804 JSHandle<BigInt> resBigint2 = BigInt::Int32ToBigInt(thread, -1); in HWTEST_F_L0()
806 JSHandle<BigInt> addres2 = BigInt::Subtract(thread, resBigint, resBigint2); in HWTEST_F_L0()
807 EXPECT_TRUE(BigInt::Equal(addres2.GetTaggedValue(), resBigint1.GetTaggedValue())); in HWTEST_F_L0()
818 JSHandle<BigInt> resBigint = BigInt::Int32ToBigInt(thread, -1); in HWTEST_F_L0()
820 JSHandle<BigInt> addres = BigInt::BigintSubOne(thread, resBigint); in HWTEST_F_L0()
824 JSHandle<BigInt> resBigint1 = BigInt::Int32ToBigInt(thread, 1); in HWTEST_F_L0()
825 JSHandle<BigInt> addres1 = BigInt::BigintSubOne(thread, resBigint1); in HWTEST_F_L0()
839 JSHandle<BigInt> bigint1 = BigIntHelper::SetBigInt(thread, bigintStr1, BigInt::BINARY); in HWTEST_F_L0()
840 JSHandle<BigInt> shift1 = BigInt::Int32ToBigInt(thread, 20); // 20 : shiftBits in HWTEST_F_L0()
841 JSHandle<BigInt> res1 = BigInt::SignedRightShift(thread, bigint1, shift1); in HWTEST_F_L0()
844 JSHandle<BigInt> expectRes1 = BigIntHelper::SetBigInt(thread, expectResStr1, BigInt::BINARY); in HWTEST_F_L0()
845 EXPECT_TRUE(BigInt::Equal(res1.GetTaggedValue(), expectRes1.GetTaggedValue())); in HWTEST_F_L0()
847 JSHandle<BigInt> shift2 = BigInt::Int32ToBigInt(thread, 0); in HWTEST_F_L0()
848 JSHandle<BigInt> res2 = BigInt::SignedRightShift(thread, bigint1, shift2); in HWTEST_F_L0()
849 EXPECT_TRUE(BigInt::Equal(res2.GetTaggedValue(), bigint1.GetTaggedValue())); in HWTEST_F_L0()
851 JSHandle<BigInt> res3 = BigInt::SignedRightShift(thread, shift2, bigint1); in HWTEST_F_L0()
852 EXPECT_TRUE(BigInt::Equal(res3.GetTaggedValue(), shift2.GetTaggedValue())); in HWTEST_F_L0()
854 JSHandle<BigInt> shift3 = BigInt::Int32ToBigInt(thread, -33); // -33 : shiftBits in HWTEST_F_L0()
855 JSHandle<BigInt> res4 = BigInt::SignedRightShift(thread, bigint1, shift3); in HWTEST_F_L0()
858 JSHandle<BigInt> expectRes4 = BigIntHelper::SetBigInt(thread, expectResStr4, BigInt::BINARY); in HWTEST_F_L0()
859 EXPECT_TRUE(BigInt::Equal(res4.GetTaggedValue(), expectRes4.GetTaggedValue())); in HWTEST_F_L0()
862 JSHandle<BigInt> bigint2 = BigInt::UnaryMinus(thread, bigint1); in HWTEST_F_L0()
866 JSHandle<BigInt> expectRes5 = BigIntHelper::SetBigInt(thread, expectResStr5, BigInt::BINARY); in HWTEST_F_L0()
867 JSHandle<BigInt> res5 = BigInt::SignedRightShift(thread, bigint2, shift1); in HWTEST_F_L0()
868 EXPECT_TRUE(BigInt::Equal(res5.GetTaggedValue(), expectRes5.GetTaggedValue())); in HWTEST_F_L0()
872 JSHandle<BigInt> expectRes6 = BigIntHelper::SetBigInt(thread, expectResStr6, BigInt::BINARY); in HWTEST_F_L0()
873 JSHandle<BigInt> res6 = BigInt::SignedRightShift(thread, bigint2, shift3); in HWTEST_F_L0()
874 EXPECT_TRUE(BigInt::Equal(res6.GetTaggedValue(), expectRes6.GetTaggedValue())); in HWTEST_F_L0()
876 JSHandle<BigInt> res7 = BigInt::SignedRightShift(thread, shift3, bigint1); in HWTEST_F_L0()
877 JSHandle<BigInt> expectRes7 = BigInt::Int32ToBigInt(thread, -1); in HWTEST_F_L0()
878 EXPECT_TRUE(BigInt::Equal(res7.GetTaggedValue(), expectRes7.GetTaggedValue())); in HWTEST_F_L0()
880 JSHandle<BigInt> shift4 = BigInt::Int32ToBigInt(thread, 65); // 65 : shiftBits in HWTEST_F_L0()
881 JSHandle<BigInt> res8 = BigInt::SignedRightShift(thread, shift3, shift4); in HWTEST_F_L0()
882 EXPECT_TRUE(BigInt::Equal(res8.GetTaggedValue(), expectRes7.GetTaggedValue())); in HWTEST_F_L0()
895 JSHandle<BigInt> bigint1 = BigIntHelper::SetBigInt(thread, bigintStr1, BigInt::BINARY); in HWTEST_F_L0()
896 JSHandle<BigInt> shift1 = BigInt::Int32ToBigInt(thread, 20); // 20 : shiftBits in HWTEST_F_L0()
897 JSHandle<BigInt> res1 = BigInt::LeftShift(thread, bigint1, shift1); in HWTEST_F_L0()
901 JSHandle<BigInt> expectRes1 = BigIntHelper::SetBigInt(thread, expectResStr1, BigInt::BINARY); in HWTEST_F_L0()
902 EXPECT_TRUE(BigInt::Equal(res1.GetTaggedValue(), expectRes1.GetTaggedValue())); in HWTEST_F_L0()
904 JSHandle<BigInt> shift2 = BigInt::Int32ToBigInt(thread, 0); in HWTEST_F_L0()
905 JSHandle<BigInt> res2 = BigInt::LeftShift(thread, bigint1, shift2); in HWTEST_F_L0()
906 EXPECT_TRUE(BigInt::Equal(res2.GetTaggedValue(), bigint1.GetTaggedValue())); in HWTEST_F_L0()
908 JSHandle<BigInt> shift3 = BigInt::Int32ToBigInt(thread, -33); // -33 : shiftBits in HWTEST_F_L0()
909 JSHandle<BigInt> res4 = BigInt::LeftShift(thread, bigint1, shift3); in HWTEST_F_L0()
911 JSHandle<BigInt> expectRes4 = BigIntHelper::SetBigInt(thread, expectResStr4, BigInt::BINARY); in HWTEST_F_L0()
912 EXPECT_TRUE(BigInt::Equal(res4.GetTaggedValue(), expectRes4.GetTaggedValue())); in HWTEST_F_L0()
915 JSHandle<BigInt> bigint2 = BigInt::UnaryMinus(thread, bigint1); in HWTEST_F_L0()
919 JSHandle<BigInt> expectRes5 = BigIntHelper::SetBigInt(thread, expectResStr5, BigInt::BINARY); in HWTEST_F_L0()
920 JSHandle<BigInt> res5 = BigInt::LeftShift(thread, bigint2, shift1); in HWTEST_F_L0()
921 EXPECT_TRUE(BigInt::Equal(res5.GetTaggedValue(), expectRes5.GetTaggedValue())); in HWTEST_F_L0()
924 JSHandle<BigInt> expectRes6 = BigIntHelper::SetBigInt(thread, expectResStr6, BigInt::BINARY); in HWTEST_F_L0()
925 JSHandle<BigInt> res6 = BigInt::LeftShift(thread, bigint2, shift3); in HWTEST_F_L0()
926 EXPECT_TRUE(BigInt::Equal(res6.GetTaggedValue(), expectRes6.GetTaggedValue())); in HWTEST_F_L0()