File: TestXdmfEquals.java

package info (click to toggle)
xdmf 3.0%2Bgit20160803-3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 35,388 kB
  • ctags: 36,627
  • sloc: ansic: 265,382; cpp: 162,889; python: 10,976; f90: 1,378; yacc: 687; fortran: 464; xml: 200; java: 187; lex: 125; makefile: 82; sh: 28
file content (39 lines) | stat: -rw-r--r-- 1,041 bytes parent folder | download | duplicates (6)
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
import mil.army.arl.xdmf.*;

public class TestXdmfEquals {
    static {
        System.loadLibrary("XdmfCoreJava");
    }

    public static void main (String argv[]) {
        System.out.println("Hello World");

		XdmfArrayType type1a = XdmfArrayType.Int16();
		XdmfArrayType type1b = XdmfArrayType.Int16();
		XdmfArrayType type2 = XdmfArrayType.Int32();	
		// Check IsEquals
		if(!(type1a.IsEqual(type1b))) /*True*/ {
			throw new SecurityException("Failed True Check");
		}
		if((type1a.IsEqual(type2))) /*False*/ {
	    		throw new SecurityException("Failed False Check");	
		}
	
		// Check equals
		if(!(type1a.equals(type1b))) /*True*/ {
			throw new SecurityException("Failed True Check (equals)");
		}
		if(type1a.equals(type2)) /*False*/ {
			throw new SecurityException("Failed False Check (equals)");
		}
	
	    	// Check ==
		if(type1a == type1b) /*False*/ {
			throw new SecurityException("Failed True Check (==)");
		}
		if(type1a == type2) /*False*/ {
			throw new SecurityException("Failed False Check (==)");
		}
		
    }
}