Skip to content

Remove WASM quickcheck infrastructure - #479

Merged
allanbrondum merged 4 commits into
feature/wasm32v1from
ar/cor-2474-property-based-tests-on-wasm32-target
Aug 20, 2026
Merged

Remove WASM quickcheck infrastructure#479
allanbrondum merged 4 commits into
feature/wasm32v1from
ar/cor-2474-property-based-tests-on-wasm32-target

Conversation

@allanbrondum

@allanbrondum allanbrondum commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Purpose

Remove the quickcheck infrastructure. Keep the TestHost get_random access from WASM tests.

Changes

  • Removed the quickcheck infrastructure
  • Commented out the property based tests we have internally
  • Exposed the randomness access via TestEnv::get_random
  • Additionally entirely removed the test_infrastructure module. Moved out the stuff that is not deprecated (report_error)

Checklist

  • My code follows the style of this project.
  • The code compiles without warnings.
  • I have performed a self-review of the changes.
  • I have documented my code, in particular the intent of the
    hard-to-understand areas.
  • (If necessary) I have updated the CHANGELOG.

Comment on lines +907 to +931
/// Reports back an error to the host when compiled to wasm
/// Used internally, not meant to be called directly by contract writers
#[doc(hidden)]
#[cfg(all(feature = "wasm-test", target_arch = "wasm32"))]
pub fn report_error(message: &str, filename: &str, line: u32, column: u32) {
let msg_bytes = message.as_bytes();
let filename_bytes = filename.as_bytes();
unsafe {
crate::prims::report_error(
msg_bytes.as_ptr(),
msg_bytes.len() as u32,
filename_bytes.as_ptr(),
filename_bytes.len() as u32,
line,
column,
)
};
}

/// Reports back an error to the host when compiled to wasm
/// Used internally, not meant to be called directly by contract writers
#[doc(hidden)]
#[cfg(not(all(feature = "wasm-test", target_arch = "wasm32")))]
pub fn report_error(_message: &str, _filename: &str, _line: u32, _column: u32) {}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Moved here from test_infrastructure

/// See the [crate](../concordium_std/#deprecating-the-test_infrastructure)
/// documentation for more details.
/// Consider using the concrete type [`ExternParameter`](crate::types::ExternParameter) instead.
pub trait HasParameter: Read + Seek + HasSize {}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Are these traits still useful? maybe these should be marked deprecated as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think we can remove them at some point, since they all (or almost all?) only have one implementation.

Base automatically changed from ar/cor-2473-implement-a-default-allocator-for-concordium-std-on-wasm32 to feature/wasm32v1 August 20, 2026 09:46
@allanbrondum
allanbrondum merged commit b6deb9d into feature/wasm32v1 Aug 20, 2026
12 checks passed
@allanbrondum
allanbrondum deleted the ar/cor-2474-property-based-tests-on-wasm32-target branch August 20, 2026 09:46
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.

2 participants