File: multiple_inheritance_overload_runme.cs

package info (click to toggle)
swig 4.1.0-0.2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 47,992 kB
  • sloc: cpp: 50,555; ansic: 27,840; java: 15,366; python: 11,221; cs: 8,852; ruby: 6,307; yacc: 6,290; makefile: 5,702; sh: 5,492; perl: 3,818; php: 3,046; ml: 2,094; lisp: 1,756; javascript: 1,751; tcl: 1,499; xml: 115
file content (58 lines) | stat: -rw-r--r-- 2,815 bytes parent folder | download | duplicates (3)
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
using System;
using System.Collections.Generic;
using multiple_inheritance_overloadNamespace;

public class multiple_inheritance_overload_runme {

  public static void check(bool fail, String msg) {
    if (fail)
      throw new Exception(msg);
  }

  public static void Main() {
    int i = 0;
    Base b1 = new Derived();
    check(b1.Method(i) != 0, "b1.Method failed");
    check(b1.MethodForRenaming(i) != 0, "b1.MethodForRenaming failed");
    check(b1.MethodForRenamingConst(i) != 1, "b1.MethodForRenamingConst failed");
    check(b1.MethodWarningSuppressed(i) != 0, "b1.MethodWarningSuppressed failed");
    check(b1.NotVirtualMethod(i) != 0, "b1.NotVirtualMethod failed");
    check(b1.SimilarOverloadedMethod(i) != 0, "b1.NotVirtualMethod failed");

    Derived d1 = new Derived();
    check(d1.Method(i) != 0, "d1.Method failed");
    check(d1.MethodForRenaming(i) != 0, "d1.MethodForRenaming failed");
    check(d1.MethodForRenamingConst(i) != 1, "d1.MethodForRenamingConst failed");
    check(d1.MethodWarningSuppressed(i) != 0, "d1.MethodWarningSuppressed failed");
    check(d1.NotVirtualMethod(i) != 0, "d1.NotVirtualMethod failed");
    check(d1.SimilarOverloadedMethod(i) != 0, "d1.NotVirtualMethod failed");

    check(d1.AnotherMethod(i) != 0, "d1.AnotherMethod failed");

    Base db1 = BaseSwigImpl.in_out(d1);
    check(db1.Method(i) != 0, "db1.Method failed");
    check(db1.MethodForRenaming(i) != 0, "db1.MethodForRenaming failed");
    check(db1.MethodForRenamingConst(i) != 1, "db1.MethodForRenamingConst failed");
    check(db1.MethodWarningSuppressed(i) != 0, "db1.MethodWarningSuppressed failed");
    check(db1.NotVirtualMethod(i) != 0, "db1.NotVirtualMethod failed");
    check(db1.SimilarOverloadedMethod(i) != 0, "db1.NotVirtualMethod failed");

    MoreDerived m1 = new MoreDerived();
    check(m1.Method(i) != 0, "m1.Method failed");
    check(m1.MethodForRenaming(i) != 0, "m1.MethodForRenaming failed");
    check(m1.MethodForRenamingConst(i) != 1, "m1.MethodForRenamingConst failed");
    check(m1.MethodWarningSuppressed(i) != 0, "m1.MethodWarningSuppressed failed");
    check(m1.NotVirtualMethod(i) != 0, "m1.NotVirtualMethod failed");
    check(m1.SimilarOverloadedMethod(i) != 0, "m1.NotVirtualMethod failed");

    check(m1.AnotherMethod(i) != 0, "m1.AnotherMethod failed");

    Base mb2 = BaseSwigImpl.in_out(m1);
    check(mb2.Method(i) != 0, "mb2.Method failed");
    check(mb2.MethodForRenaming(i) != 0, "mb2.MethodForRenaming failed");
    check(mb2.MethodForRenamingConst(i) != 1, "mb2.MethodForRenamingConst failed");
    check(mb2.MethodWarningSuppressed(i) != 0, "mb2.MethodWarningSuppressed failed");
    check(mb2.NotVirtualMethod(i) != 0, "mb2.NotVirtualMethod failed");
    check(mb2.SimilarOverloadedMethod(i) != 0, "mb2.NotVirtualMethod failed");
  }
}