sway/forc-test
Igor Rončević c73137d717
Some checks failed
Codspeed Benchmarks / benchmarks (push) Has been cancelled
CI / check-dependency-version-formats (push) Has been cancelled
CI / check-forc-manifest-version (push) Has been cancelled
CI / get-fuel-core-version (push) Has been cancelled
CI / build-sway-lib-std (push) Has been cancelled
CI / forc-fmt-check-sway-lib-std (push) Has been cancelled
CI / forc-fmt-check-sway-examples (push) Has been cancelled
CI / forc-fmt-check-panic (push) Has been cancelled
CI / check-sdk-harness-test-suite-compatibility (push) Has been cancelled
CI / build-forc-test-project (push) Has been cancelled
CI / build-mdbook (push) Has been cancelled
CI / build-forc-doc-sway-lib-std (push) Has been cancelled
CI / cargo-build-workspace (push) Has been cancelled
CI / cargo-clippy (push) Has been cancelled
CI / cargo-toml-fmt-check (push) Has been cancelled
CI / cargo-fmt-check (push) Has been cancelled
CI / cargo-test-lib-std (push) Has been cancelled
CI / forc-run-benchmarks (push) Has been cancelled
CI / forc-unit-tests (push) Has been cancelled
CI / forc-pkg-fuels-deps-check (push) Has been cancelled
CI / cargo-unused-deps-check (push) Has been cancelled
CI / pre-publish-check (push) Has been cancelled
github pages / deploy (push) Has been cancelled
CI / verifications-complete (push) Has been cancelled
CI / cargo-run-e2e-test (push) Has been cancelled
CI / cargo-run-e2e-test-release (push) Has been cancelled
CI / notify-slack-on-failure (push) Has been cancelled
CI / Build and test various forc tools (push) Has been cancelled
CI / publish (push) Has been cancelled
CI / publish-sway-lib-std (push) Has been cancelled
CI / Build and upload forc binaries to release (push) Has been cancelled
CI / build-sway-examples (push) Has been cancelled
CI / build-reference-examples (push) Waiting to run
Optionally remove test gas limit in forc test (#7495)
## Description

This PR adds `--no-gas-limit` CLI option to `forc test`. The option
increases tx gas limit in `forc test` to `u64::MAX`, essentially
removing it.

The motivation for the change was the need to benchmark heavy gas
consuming algorithms. E.g., a brute force prime factorization of the
number 9223372021822390277 took 21_474_836_627 gas units.

The new `TestGasLimit` enum provides a `Limit(limit)` variant which is
currently unused, but added for future extensions, if we want to limit
the test gas to a particular value.

## Checklist

- [ ] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [x] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [x] I have requested a review from the relevant team or maintainers.
2025-12-02 15:36:41 +13:00
..
src Optionally remove test gas limit in forc test (#7495) 2025-12-02 15:36:41 +13:00
test_data Merge std and core libraries (#6729) 2025-03-12 23:52:38 +01:00
Cargo.toml Add --gas-costs option to forc-test and E2E test runner (#7471) 2025-10-30 08:53:28 +11:00
gas_costs_values.json Add --gas-costs option to forc-test and E2E test runner (#7471) 2025-10-30 08:53:28 +11:00