Update cpuid test to expect failure on non intel cpu
authorKeith Daigle <kdaigle@fb.com>
Mon, 8 Jan 2018 19:31:12 +0000 (11:31 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 8 Jan 2018 19:35:45 +0000 (11:35 -0800)
Summary: Found that testing would fail on aarch64 since mmx is an Intel thing.  Changed it to just check for x64.

Reviewed By: yfeldblum

Differential Revision: D6670050

fbshipit-source-id: 6ce4b45bb5ef02d65305636d6ac28be7631ddf1b

folly/test/CpuIdTest.cpp

index 176f0c7c4626d66618ce5f1fa4185f7dbfd08a5f..dbab554c9e2863b718ff90ca40fd0711b02a6312 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright 2017 Facebook, Inc.
+ * Copyright 2017-present Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@
 using namespace folly;
 
 TEST(CpuId, Simple) {
 using namespace folly;
 
 TEST(CpuId, Simple) {
-  // All CPUs should support MMX
   CpuId id;
   CpuId id;
-  EXPECT_TRUE(id.mmx());
+  // All x64 CPUs should support MMX
+  EXPECT_EQ(kIsArchAmd64, id.mmx());
 }
 }