Skip to content

Conversation

@kushti
Copy link
Member

@kushti kushti commented Jun 10, 2024

Close #877

It has test from the issue as well similar ones for all the Numeric types.

Also, Downcast from BigInt to BigInt and Upcast from BigInt to BigInt are fixed now

@kushti kushti changed the base branch from develop to v6.0.0 June 10, 2024 19:16
@kushti kushti added this to the v6.0 milestone Jun 10, 2024
@kushti kushti requested a review from aslesarenko June 11, 2024 13:17
@kushti
Copy link
Member Author

kushti commented Jul 24, 2024

@aslesarenko comments addressed , please make another pass

Copy link
Member

@aslesarenko aslesarenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but please see the additional comment.

// Fixed in 6.0
assertExceptionThrown(
SBigInt.upcast(CBigInt(new BigInteger("0", 16)).asInstanceOf[AnyVal]),
_.getMessage.contains("Cannot upcast value")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good enough, but FYI there is also method exceptionLike[ConcreteExectionType]("Cannot upcast value") which tests both exception type and the contents of the message.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The check is corresponding to previously written code, so such refactoring is a subject of a dedicated issue & PR I suppose

@kushti kushti merged commit 271ec30 into v6.0.0 Jul 24, 2024
@kushti kushti deleted the i877 branch July 24, 2024 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants