Skip to content

Commit

Permalink
[fix] Fix import and rearrange C++ unit test assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy C committed Nov 18, 2021
1 parent 21a4de7 commit 7143c7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions cpp/unit_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -365,16 +365,16 @@ TEST pyos_test() {
}

Tuple2<int, int> tup = pyos::ReadByte(fd);
ASSERT_EQ_FMT(0, tup.at1(), "%d"); // error code
ASSERT_EQ_FMT('S', tup.at0(), "%d");
ASSERT_EQ_FMT(0, tup.at1(), "%d");

tup = pyos::ReadByte(fd);
ASSERT_EQ_FMT(0, tup.at1(), "%d"); // error code
ASSERT_EQ_FMT('H', tup.at0(), "%d");
ASSERT_EQ_FMT(0, tup.at1(), "%d");

tup = pyos::ReadByte(fd);
ASSERT_EQ_FMT(0, tup.at1(), "%d"); // error code
ASSERT_EQ_FMT(pyos::EOF_SENTINEL, tup.at0(), "%d");
ASSERT_EQ_FMT(0, tup.at1(), "%d");

close(fd);

Expand Down
2 changes: 1 addition & 1 deletion osh/bool_stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import stat
import posix_ as posix
from posix import X_OK, R_OK, W_OK # refers directly to C macro
from posix_ import X_OK, R_OK, W_OK # refers directly to C macro
from _devbuild.gen.id_kind_asdl import Id, Id_t
from _devbuild.gen.syntax_asdl import word_t
from core.pyerror import e_die
Expand Down

0 comments on commit 7143c7a

Please sign in to comment.