File tree Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ %% CPU_ARCH get the CPU architecture
2
+
3
+ function arch = cpu_arch()
4
+
5
+ arch = javaSystemProperty(" os.arch" );
6
+
7
+ end
Original file line number Diff line number Diff line change
1
+ %% OS_VERSION Get operating system name and version.
2
+ %
3
+ % Note: for Windows 11, need new-enough Java version to show Windows 11
4
+ % instead of Windows 10.
5
+ % Ref: https://bugs.openjdk.org/browse/JDK-8274840
6
+
7
+ function [os , version ] = os_version()
8
+
9
+ os = javaSystemProperty(" os.name" );
10
+ version = javaSystemProperty(" os.version" );
11
+
12
+ end
Original file line number Diff line number Diff line change @@ -50,6 +50,17 @@ function test_java_api(tc)
50
50
tc .verifyGreaterThanOrEqual(v , 8 , " Java API >= 8 is required for Matlab-stdlib" )
51
51
end
52
52
53
+ function test_cpu_arch(tc )
54
+ arch = stdlib .cpu_arch();
55
+ tc .verifyNotEmpty(arch )
56
+ end
57
+
58
+ function test_os_version(tc )
59
+ [os , ver ] = stdlib .os_version();
60
+ tc .verifyNotEmpty(os )
61
+ tc .verifyNotEmpty(ver )
62
+ end
63
+
53
64
54
65
function test_hard_link_count(tc )
55
66
fn = mfilename(" fullpath" ) + " .m" ;
You can’t perform that action at this time.
0 commit comments