Example #1
0
File: test.c Project: wtracy/dog
void test_space_in_new_buffer() {
  buffer_init(1);
  g_assert(is_setup());
  g_assert_cmpint(0, ==, get_longest_tail());
  g_assert_cmpint(4095, ==, get_space_free());
  g_assert_cmpint(0, ==, get_space_used());
  g_assert_cmpint(get_space_free(), >=, get_available_to_write());
  g_assert_cmpint(get_space_used(), >=, get_available_to_read(0));
  buffer_free();
}
Example #2
0
File: pwm_py.c Project: sert00/RPIO
// python function int is_setup();
static PyObject*
py_is_setup(PyObject *self, PyObject *args)
{
    return Py_BuildValue("i", is_setup());
}