summaryrefslogtreecommitdiff
path: root/internal/prefer_openssl/prefer_test.go
blob: a2ed737924520c2f4bad5dfb675f18146f1b5ae7 (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") == true {
		t.Fail()
	}
}

// Pentium G do not have AES instructions
func TestPentiumG630(t *testing.T) {
	if filePreferOpenSSL("cpuinfo.pentium_g630.txt") == false {
		t.Fail()
	}
}