Commit Graph

44 Commits

Author SHA1 Message Date
Jeong YunWon
dcd1f3138a Use is for bool comparison 2019-10-10 23:11:26 +09:00
Jeong YunWon
1216874c29 Small int cache like cpython 2019-10-10 23:11:26 +09:00
Noah
ae4b68f5ba Merge pull request #1438 from lntuition/fix-byte-like-object
Add logic to check array.array byte like object
2019-10-06 20:33:02 -05:00
Jeong YunWon
2153ebbc23 Fix pow(0, exp) with negative exp to raise ZeroDivisionError 2019-10-05 00:04:31 +09:00
Noah
9ed825742c Revert " Fix argument keyword error in int/float/bool.__new__" 2019-10-02 21:33:43 -05:00
Noah
d047dc0bd1 Merge pull request #1444 from lntuition/fix-int-arg
Fix argument keyword error in int/float/bool.__new__
2019-10-02 12:14:19 -05:00
Windel Bouwman
339e44fb5c Merge pull request #1420 from lntuition/fix-1408
Fix int type casting errors
2019-10-02 17:27:54 +02:00
lntuition
af0f03cdc6 Add testcase for int.__new__
Add testcase for int.__new__
2019-09-30 20:31:59 +09:00
lntuition
7339bdb32d Add testcase for int.from_bytes 2019-09-29 19:34:22 +09:00
Windel Bouwman
e2444b1ca3 Merge pull request #1429 from lntuition/fix-int-with-byte
Fix error in int.from_bytes and int.to_bytes
2019-09-29 09:36:39 +02:00
lntuition
6bbc69b38a Fix int type casting which number has radix and front underscore
When some number has radix and front underscore both, then ignore front underscore

fixed: #1415
2019-09-29 12:57:55 +09:00
HyeockJinKim
831c883deb Add tests for integer 2019-09-29 01:12:11 +09:00
lntuition
5a277adafb Add testcase for int.to_bytes 2019-09-28 18:22:44 +09:00
lntuition
9359a0cd05 Add testcase for int.from_bytes 2019-09-28 18:01:06 +09:00
Sang-Heon Jeon
d82fee7afa Fix wrong int type casting with radix and larger base value
Fix base value check logic when string have regex

Fixed: #1408
2019-09-26 21:45:17 +09:00
Sang-Heon Jeon
545e9d39df Fix int type casting error with negative base value
Change base type from u32 to PyIntRef

Fixed: #1405
2019-09-25 01:01:21 +09:00
Jeong YunWon
dc8057a1c2 Refactor snippets/testutil 2019-09-17 17:37:24 +09:00
Marcin Pajkowski
6d618c5e5a Add changes suggested by @seeturtle
+ Add tests covering those changes
2019-08-20 06:11:59 +02:00
Marcin Pajkowski
5e37adcf68 Apply review comments 2019-08-20 06:11:59 +02:00
Marcin Pajkowski
d07edee3f6 Add more tests for int() 2019-08-20 06:11:59 +02:00
Windel Bouwman
32634b2d53 Merge pull request #1080 from JimJeon/feature/round
Feature/round
2019-08-15 19:50:52 +02:00
JimJeon
9c4b08c7cd Add tests for round functions 2019-08-15 16:16:06 +09:00
Jeong YunWon
039cc12852 int.__[r]floordiv__ to use BigInt.div_floor 2019-08-13 11:05:34 +09:00
Jeong YunWon
e819b9a2e3 Add int.__rdivmod__ 2019-08-13 11:01:28 +09:00
Jeong YunWon
f486f3031f Fix int.__divmod__ 2019-08-13 11:01:28 +09:00
yjhmelody
7c42a18ab6 add test cases for int fn 2019-08-12 00:32:01 +08:00
Askaholic
a7065935f8 Fix test and add test for negative numberers 2019-07-23 22:24:35 -08:00
Askaholic
86a1ef2ab8 Add numerator/denominator tests to snippets 2019-07-23 12:42:45 -08:00
JimJeon
1e568f1044 Implement int.__rmod__
Extracted inner_mod function and used in int.__mod__ and int.__rmod__
and also added test snippets of int.__mod__ and int.__rmod__.
2019-06-29 15:21:28 +09:00
Shitong Wen
68a1a9f648 add to_bytes for int 2019-05-14 16:56:50 +08:00
Shitong Wen
50c119a503 fix floor div for int 2019-05-10 14:21:09 +08:00
Shitong Wen
86fcc97730 int_from_bytes 2019-05-09 20:06:28 +08:00
Shitong Wen
036b184dd3 add from_bytes for int 2019-05-09 10:52:10 +08:00
Jeong YunWon
eb9ca06ee7 Add int.__rpow__ 2019-05-02 22:59:05 +09:00
Jeong YunWon
614378d720 Add int.__pow__ negative exp impl 2019-05-02 22:44:28 +09:00
Jeong YunWon
388b62aae2 objint::to_int to call __int__ 2019-04-29 04:39:52 +09:00
ben
3ca387b509 Enhance FromArgs derive proc macro to allow positional, and positional
or keyword arguments.
2019-03-28 05:55:15 +13:00
Windel Bouwman
b0ee1947c7 Merge pull request #565 from alexpantyukhin/add_kwarg_handling_to_int
add kwarg handling for int
2019-02-28 07:36:08 +01:00
alexpantyukhin
d806a19c23 add kwarg handling for int 2019-02-27 19:58:32 +00:00
alexpantyukhin
15e6187583 add overflow errors for int shifts. 2019-02-27 11:11:38 +04:00
Adam Gutglick
852dd1086a Added tests to imag/real attributes. 2019-02-21 14:11:23 -05:00
Joey Hain
c6ac393f84 Add {int,float}.{__radd__,__rsub__,__rmul__,__rtruediv__} 2019-02-14 21:21:30 -08:00
Joey Hain
5fd912b13a Remove float comparisons from int.__eq__, add int.__ne__ 2019-02-12 21:56:25 -08:00
Joey Hain
2041b7cef6 Fix int to float comparison 2019-02-12 18:44:03 -08:00