FuelLabs / FuelLabs/sway

Introduce a shared test-types library to remove copy-pasted type definitions across e2e tests

Open
#7,693 0 comments 0 reactions 1 assignee Claimed by @ironcev View on GitHub
testing
Dominant language
Rust
Stars
61.4k
Forks
5.4k
Avg merge
3h 33m
Merged PRs (30d)
4

Description

Several e2e tests independently define the same set of types often along with the same trait and impls. This is pure copy-paste, kept in sync by hand, which is error-prone and noisy to maintain.

E.g., we have this situation in many of the tests for references and also in the three tests used in #7692:
• test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_enums_zero_sized_variants
• test/src/e2e_vm_tests/test_programs/should_pass/language/const_eval
• test/src/e2e_vm_tests/test_programs/should_pass/language/enum_zero_sized_variants

Proposal is to create a common library project (e.g. test/src/e2e_vm_tests/test_programs/common_test_types, or reuse the existing in-language test_types pattern) that exports these shared types and traits, and have tests depend on it instead of redefining everything locally.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.