File: overload_arrays_runme.sci

package info (click to toggle)
renderdoc 1.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 79,584 kB
  • sloc: cpp: 491,671; ansic: 285,823; python: 12,617; java: 11,345; cs: 7,181; makefile: 6,703; yacc: 5,682; ruby: 4,648; perl: 3,461; php: 2,119; sh: 2,068; lisp: 1,835; tcl: 1,068; ml: 747; xml: 137
file content (46 lines) | stat: -rw-r--r-- 1,363 bytes parent folder | download | duplicates (10)
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
exec("swigtest.start", -1);

// Functions

checkequal(foo(int32([1, 2, 3])), "foo:int[SIZE]", "foo(int[SIZE])");
checkequal(foo([1, 2, 3]), "foo:double[SIZE]", "foo(double[SIZE])");
checkequal(foo(["1" "2" "3"]), "foo:char *[SIZE]", "foo(char *[SIZE])");

// Class methods

s = new_Spam();
checkequal(Spam_foo(s, int32([1, 2, 3])), "foo:int[SIZE]", "Spam::foo(int[SIZE])");
checkequal(Spam_foo(s, [1, 2, 3]), "foo:double[SIZE]", "Spam::foo(double[SIZE])");
checkequal(Spam_foo(s, ["1" "2" "3"]), "foo:char *[SIZE]", "Spam::foo(char *[SIZE])");
delete_Spam(s);

// Static class methods

checkequal(Spam_bar(int32([1, 2, 3])), "bar:int[SIZE]", "Spam::bar(int[SIZE])");
checkequal(Spam_bar([1, 2, 3]), "bar:double[SIZE]", "Spam::bar(double[SIZE])");
checkequal(Spam_bar("hello"), "bar:char *[SIZE]", "Spam::bar(char *[SIZE])");

// Constructors

s = new_Spam();
checkequal(Spam_type_get(s), "none", "Spam::Spam()");
delete_Spam(s);

s = new_Spam(int32([1, 2, 3]));
checkequal(Spam_type_get(s), "int[SIZE]", "Spam::Spam(int[SIZE])");
delete_Spam(s);

s = new_Spam([1, 2, 3]);
checkequal(Spam_type_get(s), "double[SIZE]", "Spam::Spam(double[SIZE])");
delete_Spam(s);

s = new_Spam(["1" "2" "3"]);
checkequal(Spam_type_get(s), "char *[SIZE]", "Spam::Spam(char *[SIZE])");
delete_Spam(s);


a = new_ClassA();
b = ClassA_method1(a, [1 2 3]);


exec("swigtest.quit", -1);