stdbool.h
This commit is contained in:
Родитель
78fde14808
Коммит
bae448ef26
|
@ -0,0 +1,15 @@
|
|||
|
||||
#ifndef __stdbool_h__
|
||||
#define __stdbool_h__
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#define bool _Bool
|
||||
#define true 1
|
||||
#define false 0
|
||||
#define __bool_true_false_are_defined 1
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
@ -2037,6 +2037,20 @@ if 'benchmark' not in str(sys.argv) and 'sanity' not in str(sys.argv):
|
|||
|
||||
self.do_run(src, '*1,2,3,5,5,6*\n*stdin==0:0*\n*%*\n*5*\n*66.0*\n*10*\n*0*\n*-10*\n*18*\n*10*\n*0*\n*4294967286*\n*malloc(0)!=0:1*\n*cleaned*')
|
||||
|
||||
src = r'''
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
int main() {
|
||||
bool x = true;
|
||||
bool y = false;
|
||||
printf("*%d*\n", x != y);
|
||||
return 0;
|
||||
}
|
||||
'''
|
||||
|
||||
self.do_run(src, '*1*', force_c=True)
|
||||
|
||||
def test_time(self):
|
||||
# XXX Not sure what the right output is here. Looks like the test started failing with daylight savings changes. Modified it to pass again.
|
||||
src = open(path_from_root('tests', 'time', 'src.c'), 'r').read()
|
||||
|
|
Загрузка…
Ссылка в новой задаче