mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-01 23:35:41 +00:00
fix "init and reset termios" unit test
it was testing via memory-equality, which is not valid.
This commit is contained in:
parent
a8333359ce
commit
6da9a921d0
@ -36,7 +36,14 @@ TEST_CASE("init and reset termios") {
|
|||||||
resetTermios();
|
resetTermios();
|
||||||
struct termios current;
|
struct termios current;
|
||||||
tcgetattr(0, ¤t);
|
tcgetattr(0, ¤t);
|
||||||
CHECK(std::memcmp(&original, ¤t, sizeof(struct termios)) == 0);
|
CHECK_EQ(std::memcmp(¤t.c_cc, &original.c_cc, sizeof(current.c_cc)), 0);
|
||||||
|
CHECK_EQ(current.c_cflag, original.c_cflag);
|
||||||
|
CHECK_EQ(current.c_iflag, original.c_iflag);
|
||||||
|
CHECK_EQ(current.c_ispeed, original.c_ispeed);
|
||||||
|
CHECK_EQ(current.c_lflag, original.c_lflag);
|
||||||
|
CHECK_EQ(current.c_line, original.c_line);
|
||||||
|
CHECK_EQ(current.c_oflag, original.c_oflag);
|
||||||
|
CHECK_EQ(current.c_ospeed, original.c_ospeed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user