File: test-6.cpp

package info (click to toggle)
ikos 3.5-2
  • links: PTS, VCS
  • area: non-free
  • in suites: sid
  • size: 11,896 kB
  • sloc: cpp: 102,890; python: 6,471; ansic: 5,860; sh: 2,409; javascript: 348; makefile: 16
file content (31 lines) | stat: -rw-r--r-- 509 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
extern "C" {
extern void __ikos_assert(int) noexcept;
}

class A {
public:
  A() noexcept {}
  virtual void f() { __ikos_assert(false); }
  virtual void g() { __ikos_assert(false); }
  virtual ~A() {}
};

class B : public A {
public:
  B() noexcept {}
  void f() { __ikos_assert(true); }
  void g() { __ikos_assert(false); }
};

class C : public A {
public:
  C() noexcept {}
  void f() { __ikos_assert(false); }
  void g() { __ikos_assert(false); }
};

int main() {
  A* a = new B();
  a->f();
  return 0;
}