cedra-labs / cedra-labs/move-contract-examples

[BUG] tests warnings in dex

Open
#32 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Move
Stars
5
Forks
21
PR merge metrics
No merged PRs in 30d

Description

**Description:**
Tests warnings in dex.

**Steps to reproduce:**
1. Run scripts/tests.sh

**Expected behavior:**
There should be no warnings.

**Actual behavior:**
There are warnings which can be easily fixed.

**Error messages:**
```
#[expected_failure(abort_code = 0x10002)]
│ ^^^^^^^^^^^^^^^^^^^^
│ │
│ Replace value with constant from expected module or add `location=...` attribute.
warning: Test will pass on an abort from *any* module.
┌─ /home/runner/work/move-contract-examples/move-contract-examples/dex/tests/math_amm_tests.move:78:24

78 │ #[expected_failure(abort_code = 0x30001)]
│ ^^^^^^^^^^^^^^^^^^^^
│ │
│ Replace value with constant from expected module or add `location=...` attribute.
warning: Test will pass on an abort from *any* module.
┌─ /home/runner/work/move-contract-examples/move-contract-examples/dex/tests/math_amm_tests.move:84:24

84 │ #[expected_failure(abort_code = 0x10002)]
│ ^^^^^^^^^^^^^^^^^^^^
│ │
│ Replace value with constant from expected module or add `location=...` attribute.
```

**Environment:**
- OS: Ubuntu 24.04
- Cedra CLI version: 1.0.1

**Possible fix:**
Replace value with constant from expected module or add `location=...` attribute.

Contributor guide

Open the contributing guide

Research direction

Run scripts/tests.sh first, then inspect dex/tests/math_amm_tests.move, especially the expected_failure annotations around lines 78 and 84. Compare the warning guidance with the applicable expected module constants or location attributes. Done means the tests complete without these warnings.

Written by the indexing model from the issue text.

Assessment

Domain
testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.