pike.git / lib / modules / testsuite.in

version» Context lines:

pike.git/lib/modules/testsuite.in:1802:   test_equal([[ TestQueue->peek_array() ]], [[ ({ 1,2,3,4,5,6,7,8,9 }) ]])   test_eq([[ TestQueue->size() ]], 9)   test_equal([[ TestQueue->read_array() ]], [[ ({ 1,2,3,4,5,6,7,8,9 }) ]])   test_false([[ TestQueue->size() ]])   test_equal([[ TestQueue->peek_array() ]], [[ ({ }) ]])   test_equal([[ TestQueue->try_read_array() ]], [[ ({ }) ]])   test_false([[ TestQueue->size() ]])   test_true([[ zero_type(TestQueue->try_read()) ]])   test_do([[ add_constant("TestQueue"); ]])    + // Thread.ResourceCount + test_do([[ add_constant("TestResourceCount", Thread.ResourceCount()); ]]) + test_any_equal([[ +  int i; +  array a = allocate(10); +  for(i = 0; i < 10; i++) { +  a[i] = TestResourceCount->acquire(); +  } +  for(i = 0; i < 10; i++) { +  a[i] = 0; +  a[i] = TestResourceCount->drained(); +  } +  return a; + ]], ({ 0,0,0,0,0,0,0,0,0,1 })) + test_do([[ add_constant("TestResourceCount"); ]]) +    test_false(!Val.true)   test_true(!Val.false)   test_eq((int) Val.true, 1)   test_eq((int) Val.false, 0)   test_eq((string) Val.true, "1")   test_eq((string) Val.false, "0")   test_false(Val.true == 0)   test_false(Val.true == 1)   test_false(Val.false == 0)   test_false(Val.false == 1)