File tree Expand file tree Collapse file tree 4 files changed +28
-4
lines changed Expand file tree Collapse file tree 4 files changed +28
-4
lines changed Original file line number Diff line number Diff line change 5
5
arch = javaSystemProperty(" os.arch" );
6
6
7
7
end
8
+
9
+ % !assert(!isempty(cpu_arch()))
Original file line number Diff line number Diff line change
1
+ %% JAVA_VENDOR get vendor of Java Virtual Machine
2
+
3
+ function v = java_vendor()
4
+
5
+ v = javaSystemProperty(" java.vendor" );
6
+
7
+ end
8
+
9
+ % !assert(!isempty(java_vendor()))
Original file line number Diff line number Diff line change 10
10
version = javaSystemProperty(" os.version" );
11
11
12
12
end
13
+
14
+ % !test
15
+ % ! [os, version] = os_version();
16
+ % ! assert(!isempty(os))
17
+ % ! assert(!isempty(version))
Original file line number Diff line number Diff line change @@ -37,6 +37,12 @@ function test_hostname(tc)
37
37
tc .verifyGreaterThan(L , 0 , " expected non-empty hostname" )
38
38
end
39
39
40
+ function test_java_vendor(tc )
41
+ v = stdlib .java_vendor();
42
+ L = strlength(v );
43
+ tc .verifyGreaterThan(L , 0 , " expected non-empty vendor" )
44
+ end
45
+
40
46
41
47
function test_java_version(tc )
42
48
v = stdlib .java_version();
@@ -52,16 +58,18 @@ function test_java_api(tc)
52
58
53
59
function test_cpu_arch(tc )
54
60
arch = stdlib .cpu_arch();
55
- tc .verifyNotEmpty(arch )
61
+ L = strlength(arch );
62
+ tc .verifyGreaterThan(L , 0 , " expected non-empty arch" )
56
63
end
57
64
58
65
function test_os_version(tc )
59
66
[os , ver ] = stdlib .os_version();
60
- tc .verifyNotEmpty(os )
61
- tc .verifyNotEmpty(ver )
67
+ Lo = strlength(os );
68
+ Lv = strlength(ver );
69
+ tc .verifyGreaterThan(Lo , 0 , " expected non-empty os" )
70
+ tc .verifyGreaterThan(Lv , 0 , " expected non-empty version" )
62
71
end
63
72
64
-
65
73
function test_hard_link_count(tc )
66
74
fn = mfilename(" fullpath" ) + " .m" ;
67
75
You can’t perform that action at this time.
0 commit comments