Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only unbox value class answers when appropriate #1204

Merged
merged 2 commits into from Jan 16, 2024
Merged

Conversation

jselbo
Copy link

@jselbo jselbo commented Jan 12, 2024

Fixes issue: #1037

Without this change, the two new test cases fail with:

java.lang.ClassCastException: class java.lang.Integer cannot be cast to class io.mockk.it.ValueClassTest$Companion$DummyValue (java.lang.Integer is in module java.base of loader 'bootstrap'; io.mockk.it.ValueClassTest$Companion$DummyValue is in unnamed module of loader 'app')

@Raibaz
Copy link
Collaborator

Raibaz commented Jan 13, 2024

Nice one, thanks for putting this together, I like the implementation!

Can you please run gradle mockk-core:apiDump to update the api definition files?

@Raibaz Raibaz merged commit 640966d into mockk:master Jan 16, 2024
11 checks passed
sksamuel pushed a commit to kotest/kotest that referenced this pull request Mar 9, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [io.mockk:mockk](https://mockk.io)
([source](https://togithub.com/mockk/mockk)) | `1.13.9` -> `1.13.10` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.mockk:mockk/1.13.10?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/io.mockk:mockk/1.13.10?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/io.mockk:mockk/1.13.9/1.13.10?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/io.mockk:mockk/1.13.9/1.13.10?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>mockk/mockk (io.mockk:mockk)</summary>

### [`v1.13.10`](https://togithub.com/mockk/mockk/releases/tag/1.13.10)

[Compare
Source](https://togithub.com/mockk/mockk/compare/1.13.9...1.13.10)

#### What's Changed

- Add support to nested value classes by
[@&#8203;rotilho](https://togithub.com/rotilho) in
[mockk/mockk#1202
- Fix callOriginal on default interface method by
[@&#8203;flapenna](https://togithub.com/flapenna) in
[mockk/mockk#1203
- Only unbox value class answers when appropriate by
[@&#8203;jselbo](https://togithub.com/jselbo) in
[mockk/mockk#1204
- Fix capture using mutable list of value class by
[@&#8203;ath0s](https://togithub.com/ath0s) in
[mockk/mockk#1209
- Updates documentation to include example access error workaround for
Android users by [@&#8203;JakeSteam](https://togithub.com/JakeSteam) in
[mockk/mockk#1211

#### New Contributors

- [@&#8203;rotilho](https://togithub.com/rotilho) made their first
contribution in
[mockk/mockk#1202
- [@&#8203;jselbo](https://togithub.com/jselbo) made their first
contribution in
[mockk/mockk#1204
- [@&#8203;ath0s](https://togithub.com/ath0s) made their first
contribution in
[mockk/mockk#1209
- [@&#8203;JakeSteam](https://togithub.com/JakeSteam) made their first
contribution in
[mockk/mockk#1211

**Full Changelog**:
mockk/mockk@1.13.9...1.13.10

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 3am on the first day of the
month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/kotest/kotest).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMjAuMiIsInVwZGF0ZWRJblZlciI6IjM3LjIyNy4yIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

None yet

2 participants