mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-01 02:02:28 +00:00
Perform code cleanup on test pledges
This commit is contained in:
parent
3d2cf95af1
commit
3443039f34
54 changed files with 112 additions and 83 deletions
|
@ -17,6 +17,7 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/bits/bits.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
|
@ -24,6 +25,11 @@
|
|||
#define ROR(w, k) (CheckUnsigned(w) >> (k) | (w) << (sizeof(w) * 8 - (k)))
|
||||
#define ROL(w, k) ((w) << (k) | CheckUnsigned(w) >> (sizeof(w) * 8 - (k)))
|
||||
|
||||
void SetUpOnce(void) {
|
||||
pledge("stdio", 0);
|
||||
errno = 0;
|
||||
}
|
||||
|
||||
TEST(TwosComplementBane, LiteralsThatAreLiterallyTheSameNumber) {
|
||||
EXPECT_EQ(4, sizeof(INT_MIN));
|
||||
EXPECT_EQ(8, sizeof(-2147483648));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue