コード例 #1
0
int
main()
{
    equality_test();
    ordering_test();
    return boost::report_errors();
}
コード例 #2
0
ファイル: eval-hol.c プロジェクト: evgenymartynov/comp1927
static value_t *e_equals(env_t *env, expr_t *l, expr_t *r)
{
  value_t *result;

  result = alloc_value(v_bool);
  bool_val(result) = equality_test(e_expr(env, l), e_expr(env, r));

  return result;
}
コード例 #3
0
ファイル: eval-fos.c プロジェクト: evgenymartynov/comp1927
static int equality_test_i(void *data_l, void *data_r, void *info)
{
  int *equal = (int *)info;
  value_t *l = (value_t *)data_l;
  value_t *r = (value_t *)data_r;

  if (*equal) {
    *equal = equality_test(l, r);
  }

  return 1;
}
コード例 #4
0
ファイル: eval-hol.c プロジェクト: evgenymartynov/comp1927
static int equality_test_i(void *data_l, void *data_r, void *info)
{
  int *equal = (int *)info;
  value_t *l = (value_t *)data_l;
  value_t *r = (value_t *)data_r;

  if (*equal) {
    // Careful: we might be in the middle of a data structure, so force the thunks.
    *equal = equality_test(thunk_force(l), thunk_force(r));
  }

  return 1;
}