blob: 289a0a90e03d8a15e36986e4e0f9b6ccc7aebdbc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
package prefer_openssl
import (
"testing"
)
func TestCurrentCPU(t *testing.T) {
t.Logf("PreferOpenSSL=%v", PreferOpenSSL())
}
// Has AES instructions
func TestXeonE312xx(t *testing.T) {
if filePreferOpenSSL("cpuinfo.xeon_e312xx.txt") {
t.Fail()
}
}
// Pentium G do not have AES instructions
func TestPentiumG630(t *testing.T) {
if !filePreferOpenSSL("cpuinfo.pentium_g630.txt") {
t.Fail()
}
}
|