Skip to content

Commit

Permalink
Rename var in test and rename test (#864)
Browse files Browse the repository at this point in the history
### What
Rename 'entries' var in test to 'entry'. Rename test from 'docs' to
'docs_fn'.

### Why
The entries variable contains a single spec entry. The plural is
misleading.

The docs test contains tests only for docs on functions.
  • Loading branch information
leighmcculloch authored Feb 13, 2023
1 parent 7cc466d commit b676bc2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion soroban-sdk/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mod budget;
mod contract_add_i32;
mod contract_assert;
mod contract_call_stack;
mod contract_docs;
mod contract_docs_fn;
mod contract_invoke;
mod contract_overlapping_type_fn_names;
mod contract_snapshot;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ fn test_functional() {

#[test]
fn test_spec() {
let entries = ScSpecEntry::from_xdr(__SPEC_XDR_FN_ADD).unwrap();
let entry = ScSpecEntry::from_xdr(__SPEC_XDR_FN_ADD).unwrap();
let expect = ScSpecEntry::FunctionV0(ScSpecFunctionV0 {
doc: "Add adds\nthings together.".try_into().unwrap(),
name: "add".try_into().unwrap(),
inputs: vec![].try_into().unwrap(),
outputs: vec![].try_into().unwrap(),
});
assert_eq!(entries, expect);
assert_eq!(entry, expect);
}

0 comments on commit b676bc2

Please sign in to comment.