diff options
Diffstat (limited to 'internal/prefer_openssl/prefer_test.go')
-rw-r--r-- | internal/prefer_openssl/prefer_test.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/internal/prefer_openssl/prefer_test.go b/internal/prefer_openssl/prefer_test.go new file mode 100644 index 0000000..a2ed737 --- /dev/null +++ b/internal/prefer_openssl/prefer_test.go @@ -0,0 +1,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() + } +} |