Skip to content

Commit

Permalink
test: more test
Browse files Browse the repository at this point in the history
  • Loading branch information
quininer committed Aug 17, 2024
1 parent 2d62e0b commit 12f3034
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ jobs:
run: rustup update stable
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: all feature
run: cargo llvm-cov --all --all-features --lcov --output-path lcov.info
- name: Test all
run: cargo llvm-cov test --all --all-features --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
Expand Down
11 changes: 11 additions & 0 deletions tests/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,3 +289,14 @@ fn test_ignored_any_eof_loop() {
_ => panic!()
}
}

#[test]
fn test_cov_u16() {
let mut buf = BufWriter::new(Vec::new());
u16::MAX.encode(&mut buf).unwrap();

let mut reader = SliceReader::new(buf.buffer());
let v = u16::decode(&mut reader).unwrap();

assert_eq!(v, u16::MAX);
}

0 comments on commit 12f3034

Please sign in to comment.