Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed
- Restrict syntax for setting default ink! e2e test runtime-only emulator - [#2143](https://github.com/paritytech/ink/pull/2143)

## Version 5.0.0-rc.2

### Added
Expand Down
13 changes: 13 additions & 0 deletions crates/e2e/macro/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ impl Node {
#[derive(Clone, Eq, PartialEq, Debug, darling::FromMeta)]
pub enum RuntimeOnly {
#[darling(word)]
#[darling(skip)]
Default,
Runtime(syn::Path),
}
Expand Down Expand Up @@ -134,6 +135,18 @@ mod tests {
assert_eq!(config.backend(), Backend::RuntimeOnly(RuntimeOnly::Default));
}

#[test]
#[should_panic(expected = "ErrorUnknownField")]
fn config_works_backend_runtime_only_default_not_allowed() {
let input = quote! {
backend(runtime_only(default)),
};
let config =
E2EConfig::from_list(&NestedMeta::parse_meta_list(input).unwrap()).unwrap();

assert_eq!(config.backend(), Backend::RuntimeOnly(RuntimeOnly::Default));
}

#[test]
fn config_works_runtime_only_with_custom_backend() {
let input = quote! {
Expand Down