Perform code cleanup on test pledges

This commit is contained in:
Justine Tunney 2022-07-24 22:34:13 -07:00
parent 3d2cf95af1
commit 3443039f34
54 changed files with 112 additions and 83 deletions

View file

@ -17,8 +17,15 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/bits/bits.h"
#include "libc/calls/calls.h"
#include "libc/errno.h"
#include "libc/testlib/testlib.h"
void SetUpOnce(void) {
pledge("stdio", 0);
errno = 0;
}
TEST(roundup2log, test) {
EXPECT_EQ(0, roundup2log(0));
EXPECT_EQ(1, roundup2log(1));