2
0
Fork 1
mirror of https://github.com/async-rs/async-std.git synced 2025-04-02 06:26:41 +00:00

Enable tests on CI ()

* Enable tests on CI

* Fix failed test
This commit is contained in:
Taiki Endo 2019-10-17 07:06:29 +09:00 committed by GitHub
parent ca80ca981e
commit e405544ea0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions
.github/workflows
tests

View file

@ -41,7 +41,7 @@ jobs:
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: with:
command: test command: test
args: --all --doc --features unstable args: --all --features unstable
check_fmt_and_docs: check_fmt_and_docs:
name: Checking fmt and docs name: Checking fmt and docs

View file

@ -48,13 +48,13 @@ fn test_buffered_writer() {
} }
#[test] #[test]
fn test_buffered_writer_inner_into_inner_does_not_flush() { fn test_buffered_writer_inner_into_inner_flushes() {
task::block_on(async { task::block_on(async {
let mut w = BufWriter::with_capacity(3, Vec::new()); let mut w = BufWriter::with_capacity(3, Vec::new());
w.write(&[0, 1]).await.unwrap(); w.write(&[0, 1]).await.unwrap();
assert_eq!(*w.get_ref(), []); assert_eq!(*w.get_ref(), []);
let w = w.into_inner().await.unwrap(); let w = w.into_inner().await.unwrap();
assert_eq!(w, []); assert_eq!(w, [0, 1]);
}) })
} }