File: test_smtaxioms.cpp

package info (click to toggle)
boolector 3.2.4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 20,744 kB
  • sloc: ansic: 83,136; cpp: 18,159; sh: 3,668; python: 2,889; makefile: 210
file content (74 lines) | stat: -rw-r--r-- 2,034 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*  Boolector: Satisfiability Modulo Theories (SMT) solver.
 *
 *  Copyright (C) 2007-2021 by the authors listed in the AUTHORS file.
 *
 *  This file is part of Boolector.
 *  See COPYING for more information on using this software.
 */

#include "test.h"

class TestSMTAxioms : public TestFile
{
 protected:
  void SetUp () override
  {
    TestFile::SetUp ();
    d_check_log_file = false;
  }

  void run_smtaxioms_test (const std::string& s)
  {
    for (int32_t i = 1; i <= 8; i++)
    {
      run_smtaxioms_test_helper (s, i);
    }
    if (s != "bvsmod" && s != "bvsdiv" && s != "bvsrem")
    {
      run_smtaxioms_test_helper (s, 16);
      run_smtaxioms_test_helper (s, 32);
      run_smtaxioms_test_helper (s, 64);
    }
  }

 private:
  void run_smtaxioms_test_helper (const std::string& s, int32_t i)
  {
    std::stringstream ss_name;
    ss_name << "smtaxiom" << s << i;
    run_test (ss_name.str ().c_str (), ".smt2", BOOLECTOR_UNSAT);
    TearDown ();
    SetUp ();
  }
};

TEST_F (TestSMTAxioms, bvnand) { run_smtaxioms_test ("bvnand"); }

TEST_F (TestSMTAxioms, bvnor) { run_smtaxioms_test ("bvnor"); }

TEST_F (TestSMTAxioms, bvsge) { run_smtaxioms_test ("bvsge"); }

TEST_F (TestSMTAxioms, bvsgt) { run_smtaxioms_test ("bvsgt"); }

TEST_F (TestSMTAxioms, bvsle) { run_smtaxioms_test ("bvsle"); }

TEST_F (TestSMTAxioms, bvslt) { run_smtaxioms_test ("bvslt"); }

TEST_F (TestSMTAxioms, bvuge) { run_smtaxioms_test ("bvuge"); }

TEST_F (TestSMTAxioms, bvugt) { run_smtaxioms_test ("bvugt"); }

TEST_F (TestSMTAxioms, bvule) { run_smtaxioms_test ("bvule"); }

TEST_F (TestSMTAxioms, bvxnor) { run_smtaxioms_test ("bvxnor"); }

TEST_F (TestSMTAxioms, bvxor) { run_smtaxioms_test ("bvxor"); }

TEST_F (TestSMTAxioms, bvsub) { run_smtaxioms_test ("bvsub"); }

/* below are the 'hard' test cases (no 16, 32, 64 bits) */
TEST_F (TestSMTAxioms, bvsmod) { run_smtaxioms_test ("bvsmod"); }

TEST_F (TestSMTAxioms, bvsdiv) { run_smtaxioms_test ("bvsdiv"); }

TEST_F (TestSMTAxioms, bvsrem) { run_smtaxioms_test ("bvsrem"); }