Basic test for cluster info in mock tests
diff --git a/test/mock/alcatel-revvl.cc b/test/mock/alcatel-revvl.cc
index 00e6bec..24fc615 100644
--- a/test/mock/alcatel-revvl.cc
+++ b/test/mock/alcatel-revvl.cc
@@ -24,6 +24,22 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -109,6 +125,22 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 4:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -183,6 +215,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/atm7029b-tablet.cc b/test/mock/atm7029b-tablet.cc
index 5060330..c4e49fb 100644
--- a/test/mock/atm7029b-tablet.cc
+++ b/test/mock/atm7029b-tablet.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/blu-r1-hd.cc b/test/mock/blu-r1-hd.cc
index 0c40b3b..a30dea6 100644
--- a/test/mock/blu-r1-hd.cc
+++ b/test/mock/blu-r1-hd.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -170,6 +182,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/galaxy-a3-2016-eu.cc b/test/mock/galaxy-a3-2016-eu.cc
index ae3b7b0..5c70164 100644
--- a/test/mock/galaxy-a3-2016-eu.cc
+++ b/test/mock/galaxy-a3-2016-eu.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/galaxy-a8-2016-duos.cc b/test/mock/galaxy-a8-2016-duos.cc
index b9ce40b..1f37a24 100644
--- a/test/mock/galaxy-a8-2016-duos.cc
+++ b/test/mock/galaxy-a8-2016-duos.cc
@@ -24,6 +24,25 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -118,6 +137,25 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -205,6 +243,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/galaxy-a8-2018.cc b/test/mock/galaxy-a8-2018.cc
index 3945d8c..4b06bc3 100644
--- a/test/mock/galaxy-a8-2018.cc
+++ b/test/mock/galaxy-a8-2018.cc
@@ -24,6 +24,25 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -118,6 +137,25 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -231,6 +269,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/galaxy-c9-pro.cc b/test/mock/galaxy-c9-pro.cc
index 190ced5..4c45c98 100644
--- a/test/mock/galaxy-c9-pro.cc
+++ b/test/mock/galaxy-c9-pro.cc
@@ -24,6 +24,25 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -118,6 +137,25 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -231,6 +269,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/galaxy-grand-prime-value-edition.cc b/test/mock/galaxy-grand-prime-value-edition.cc
index d3c1b06..6ca2e1e 100644
--- a/test/mock/galaxy-grand-prime-value-edition.cc
+++ b/test/mock/galaxy-grand-prime-value-edition.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/galaxy-j1-2016.cc b/test/mock/galaxy-j1-2016.cc
index bad7a42..f2268ab 100644
--- a/test/mock/galaxy-j1-2016.cc
+++ b/test/mock/galaxy-j1-2016.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/galaxy-j5.cc b/test/mock/galaxy-j5.cc
index 2cd51cc..ebdeeb6 100644
--- a/test/mock/galaxy-j5.cc
+++ b/test/mock/galaxy-j5.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/galaxy-j7-prime.cc b/test/mock/galaxy-j7-prime.cc
index 01bee64..7c624dc 100644
--- a/test/mock/galaxy-j7-prime.cc
+++ b/test/mock/galaxy-j7-prime.cc
@@ -24,6 +24,25 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -118,6 +137,25 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -192,6 +230,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/galaxy-j7-tmobile.cc b/test/mock/galaxy-j7-tmobile.cc
index c145b79..3a41f1f 100644
--- a/test/mock/galaxy-j7-tmobile.cc
+++ b/test/mock/galaxy-j7-tmobile.cc
@@ -24,6 +24,25 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -118,6 +137,25 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -192,6 +230,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/galaxy-j7-uae.cc b/test/mock/galaxy-j7-uae.cc
index 9a1d47b..37344d0 100644
--- a/test/mock/galaxy-j7-uae.cc
+++ b/test/mock/galaxy-j7-uae.cc
@@ -24,6 +24,25 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -118,6 +137,25 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -192,6 +230,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/galaxy-s3-us.cc b/test/mock/galaxy-s3-us.cc
index bfe847c..9990424 100644
--- a/test/mock/galaxy-s3-us.cc
+++ b/test/mock/galaxy-s3-us.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/galaxy-s4-us.cc b/test/mock/galaxy-s4-us.cc
index 78a9ddb..f017fd6 100644
--- a/test/mock/galaxy-s4-us.cc
+++ b/test/mock/galaxy-s4-us.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/galaxy-s5-global.cc b/test/mock/galaxy-s5-global.cc
index ac00013..480d473 100644
--- a/test/mock/galaxy-s5-global.cc
+++ b/test/mock/galaxy-s5-global.cc
@@ -24,6 +24,25 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -118,6 +137,25 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -231,6 +269,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/galaxy-s5-us.cc b/test/mock/galaxy-s5-us.cc
index 98ee230..21a8b8a 100644
--- a/test/mock/galaxy-s5-us.cc
+++ b/test/mock/galaxy-s5-us.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/galaxy-s6.cc b/test/mock/galaxy-s6.cc
index e713719..d6d4f7b 100644
--- a/test/mock/galaxy-s6.cc
+++ b/test/mock/galaxy-s6.cc
@@ -24,6 +24,25 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -118,6 +137,25 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -231,6 +269,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/galaxy-s7-global.cc b/test/mock/galaxy-s7-global.cc
index 2b3a1be..34217b9 100644
--- a/test/mock/galaxy-s7-global.cc
+++ b/test/mock/galaxy-s7-global.cc
@@ -24,6 +24,25 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -118,6 +137,25 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -244,6 +282,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/galaxy-s7-us.cc b/test/mock/galaxy-s7-us.cc
index b06b481..2da531b 100644
--- a/test/mock/galaxy-s7-us.cc
+++ b/test/mock/galaxy-s7-us.cc
@@ -24,6 +24,21 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -110,6 +125,21 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -202,6 +232,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/galaxy-s8-global.cc b/test/mock/galaxy-s8-global.cc
index c1627a0..91c4cfd 100644
--- a/test/mock/galaxy-s8-global.cc
+++ b/test/mock/galaxy-s8-global.cc
@@ -24,6 +24,25 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -118,6 +137,25 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -244,6 +282,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/galaxy-s8-us.cc b/test/mock/galaxy-s8-us.cc
index 21b0b9a..74aceb4 100644
--- a/test/mock/galaxy-s8-us.cc
+++ b/test/mock/galaxy-s8-us.cc
@@ -24,6 +24,25 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -118,6 +137,25 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -231,6 +269,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/galaxy-s9-us.cc b/test/mock/galaxy-s9-us.cc
index f5016c4..9ab392f 100644
--- a/test/mock/galaxy-s9-us.cc
+++ b/test/mock/galaxy-s9-us.cc
@@ -24,6 +24,25 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -61,28 +80,15 @@
}
}
-TEST(PROCESSORS, l2) {
+TEST(PROCESSORS, DISABLED_l2) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
- switch (i) {
- case 0:
- case 1:
- case 2:
- case 3:
- ASSERT_EQ(cpuinfo_get_l2_cache(0), cpuinfo_get_processor(i)->cache.l2);
- break;
- case 4:
- case 5:
- case 6:
- case 7:
- ASSERT_EQ(cpuinfo_get_l2_cache(1), cpuinfo_get_processor(i)->cache.l2);
- break;
- }
+ ASSERT_EQ(cpuinfo_get_l2_cache(i), cpuinfo_get_processor(i)->cache.l2);
}
}
-TEST(PROCESSORS, l3) {
+TEST(PROCESSORS, DISABLED_l3) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
- ASSERT_FALSE(cpuinfo_get_processor(i)->cache.l3);
+ ASSERT_EQ(cpuinfo_get_l3_cache(0), cpuinfo_get_processor(i)->cache.l3);
}
}
@@ -118,6 +124,25 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -231,6 +256,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/galaxy-tab-3-7.0.cc b/test/mock/galaxy-tab-3-7.0.cc
index 5bfcb0a..51d83b3 100644
--- a/test/mock/galaxy-tab-3-7.0.cc
+++ b/test/mock/galaxy-tab-3-7.0.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/galaxy-tab-3-lite.cc b/test/mock/galaxy-tab-3-lite.cc
index 814dd6a..2d92243 100644
--- a/test/mock/galaxy-tab-3-lite.cc
+++ b/test/mock/galaxy-tab-3-lite.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/galaxy-win-duos.cc b/test/mock/galaxy-win-duos.cc
index 64f9e6e..fa0095b 100644
--- a/test/mock/galaxy-win-duos.cc
+++ b/test/mock/galaxy-win-duos.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/huawei-ascend-p7.cc b/test/mock/huawei-ascend-p7.cc
index fdcef83..058a680 100644
--- a/test/mock/huawei-ascend-p7.cc
+++ b/test/mock/huawei-ascend-p7.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/huawei-mate-10.cc b/test/mock/huawei-mate-10.cc
index 20206a0..f307a95 100644
--- a/test/mock/huawei-mate-10.cc
+++ b/test/mock/huawei-mate-10.cc
@@ -24,6 +24,25 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -118,6 +137,25 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -231,6 +269,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/huawei-mate-8.cc b/test/mock/huawei-mate-8.cc
index cd34a57..e563b59 100644
--- a/test/mock/huawei-mate-8.cc
+++ b/test/mock/huawei-mate-8.cc
@@ -24,6 +24,25 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -118,6 +137,25 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -231,6 +269,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/huawei-mate-9.cc b/test/mock/huawei-mate-9.cc
index 9c0fb28..bb9f301 100644
--- a/test/mock/huawei-mate-9.cc
+++ b/test/mock/huawei-mate-9.cc
@@ -24,6 +24,25 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -118,6 +137,25 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -231,6 +269,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/huawei-p8-lite.cc b/test/mock/huawei-p8-lite.cc
index b7bed16..0734698 100644
--- a/test/mock/huawei-p8-lite.cc
+++ b/test/mock/huawei-p8-lite.cc
@@ -24,6 +24,25 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -105,6 +124,25 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -179,6 +217,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/huawei-p9-lite.cc b/test/mock/huawei-p9-lite.cc
index b0db17e..5be731a 100644
--- a/test/mock/huawei-p9-lite.cc
+++ b/test/mock/huawei-p9-lite.cc
@@ -24,6 +24,25 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -118,6 +137,25 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -205,6 +243,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/iconia-one-10.cc b/test/mock/iconia-one-10.cc
index c92f466..9392cee 100644
--- a/test/mock/iconia-one-10.cc
+++ b/test/mock/iconia-one-10.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/lenovo-a6600-plus.cc b/test/mock/lenovo-a6600-plus.cc
index c2d43a0..8b28cb4 100644
--- a/test/mock/lenovo-a6600-plus.cc
+++ b/test/mock/lenovo-a6600-plus.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/lenovo-vibe-x2.cc b/test/mock/lenovo-vibe-x2.cc
index 1fed5f3..f2a566c 100644
--- a/test/mock/lenovo-vibe-x2.cc
+++ b/test/mock/lenovo-vibe-x2.cc
@@ -24,6 +24,25 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -231,6 +250,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/lg-k10-eu.cc b/test/mock/lg-k10-eu.cc
index c511e67..081186e 100644
--- a/test/mock/lg-k10-eu.cc
+++ b/test/mock/lg-k10-eu.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/lg-optimus-g-pro.cc b/test/mock/lg-optimus-g-pro.cc
index e1e4b55..a611933 100644
--- a/test/mock/lg-optimus-g-pro.cc
+++ b/test/mock/lg-optimus-g-pro.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/meizu-pro-6.cc b/test/mock/meizu-pro-6.cc
index 98c7644..907f00a 100644
--- a/test/mock/meizu-pro-6.cc
+++ b/test/mock/meizu-pro-6.cc
@@ -24,6 +24,29 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ ASSERT_EQ(cpuinfo_get_cluster(2), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -126,6 +149,29 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ ASSERT_EQ(cpuinfo_get_cluster(2), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -247,6 +293,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(3, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/meizu-pro-6s.cc b/test/mock/meizu-pro-6s.cc
index dff0ec2..3735428 100644
--- a/test/mock/meizu-pro-6s.cc
+++ b/test/mock/meizu-pro-6s.cc
@@ -24,6 +24,29 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ ASSERT_EQ(cpuinfo_get_cluster(2), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -126,6 +149,29 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ ASSERT_EQ(cpuinfo_get_cluster(2), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -247,6 +293,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(3, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/meizu-pro-7-plus.cc b/test/mock/meizu-pro-7-plus.cc
index 34284ae..f23bc37 100644
--- a/test/mock/meizu-pro-7-plus.cc
+++ b/test/mock/meizu-pro-7-plus.cc
@@ -24,6 +24,29 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ ASSERT_EQ(cpuinfo_get_cluster(2), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -126,6 +149,29 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ ASSERT_EQ(cpuinfo_get_cluster(2), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -251,6 +297,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(3, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/moto-e-gen1.cc b/test/mock/moto-e-gen1.cc
index d0b1a36..1a48e87 100644
--- a/test/mock/moto-e-gen1.cc
+++ b/test/mock/moto-e-gen1.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/moto-g-gen1.cc b/test/mock/moto-g-gen1.cc
index cca610b..f8b36cf 100644
--- a/test/mock/moto-g-gen1.cc
+++ b/test/mock/moto-g-gen1.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/moto-g-gen2.cc b/test/mock/moto-g-gen2.cc
index 7fa0b52..0cf95e5 100644
--- a/test/mock/moto-g-gen2.cc
+++ b/test/mock/moto-g-gen2.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/moto-g-gen3.cc b/test/mock/moto-g-gen3.cc
index e8e44d7..add594b 100644
--- a/test/mock/moto-g-gen3.cc
+++ b/test/mock/moto-g-gen3.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/moto-g-gen4.cc b/test/mock/moto-g-gen4.cc
index 8194ecb..2bd8899 100644
--- a/test/mock/moto-g-gen4.cc
+++ b/test/mock/moto-g-gen4.cc
@@ -24,6 +24,25 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -118,6 +137,25 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -192,6 +230,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/nexus-s.cc b/test/mock/nexus-s.cc
index 5d1e09b..a1efb52 100644
--- a/test/mock/nexus-s.cc
+++ b/test/mock/nexus-s.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/nexus10.cc b/test/mock/nexus10.cc
index c4fec63..d111c81 100644
--- a/test/mock/nexus10.cc
+++ b/test/mock/nexus10.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/nexus4.cc b/test/mock/nexus4.cc
index 9b2bb27..902e915 100644
--- a/test/mock/nexus4.cc
+++ b/test/mock/nexus4.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/nexus5x.cc b/test/mock/nexus5x.cc
index fe0b9e1..99c2752 100644
--- a/test/mock/nexus5x.cc
+++ b/test/mock/nexus5x.cc
@@ -24,6 +24,23 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -114,6 +131,23 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -221,6 +255,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/nexus6.cc b/test/mock/nexus6.cc
index a025cde..57fa1cc 100644
--- a/test/mock/nexus6.cc
+++ b/test/mock/nexus6.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/nexus6p.cc b/test/mock/nexus6p.cc
index abae866..251e602 100644
--- a/test/mock/nexus6p.cc
+++ b/test/mock/nexus6p.cc
@@ -24,6 +24,25 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -118,6 +137,25 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -231,6 +269,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/nexus9.cc b/test/mock/nexus9.cc
index 08395c8..90ade44 100644
--- a/test/mock/nexus9.cc
+++ b/test/mock/nexus9.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/oneplus-3t.cc b/test/mock/oneplus-3t.cc
index e972e7e..4f46d54 100644
--- a/test/mock/oneplus-3t.cc
+++ b/test/mock/oneplus-3t.cc
@@ -24,6 +24,21 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -110,6 +125,21 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -202,6 +232,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/oneplus-5.cc b/test/mock/oneplus-5.cc
index 6084b74..63d000c 100644
--- a/test/mock/oneplus-5.cc
+++ b/test/mock/oneplus-5.cc
@@ -24,6 +24,25 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -118,6 +137,25 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -231,6 +269,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/oneplus-5t.cc b/test/mock/oneplus-5t.cc
index a39e98b..b28ad42 100644
--- a/test/mock/oneplus-5t.cc
+++ b/test/mock/oneplus-5t.cc
@@ -24,6 +24,25 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -118,6 +137,25 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -231,6 +269,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/oppo-a37.cc b/test/mock/oppo-a37.cc
index fa12c2b..6f10e41 100644
--- a/test/mock/oppo-a37.cc
+++ b/test/mock/oppo-a37.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/oppo-r9.cc b/test/mock/oppo-r9.cc
index e1aef99..965b5b4 100644
--- a/test/mock/oppo-r9.cc
+++ b/test/mock/oppo-r9.cc
@@ -24,6 +24,25 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -118,6 +137,25 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -205,6 +243,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/padcod-10.1.cc b/test/mock/padcod-10.1.cc
index d33649c..95d1bdf 100644
--- a/test/mock/padcod-10.1.cc
+++ b/test/mock/padcod-10.1.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/pixel-2-xl.cc b/test/mock/pixel-2-xl.cc
index 5ef37b8..c129cf6 100644
--- a/test/mock/pixel-2-xl.cc
+++ b/test/mock/pixel-2-xl.cc
@@ -24,6 +24,25 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -118,6 +137,25 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -231,6 +269,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/pixel-c.cc b/test/mock/pixel-c.cc
index 1910ef9..5f2a66d 100644
--- a/test/mock/pixel-c.cc
+++ b/test/mock/pixel-c.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/pixel-xl.cc b/test/mock/pixel-xl.cc
index dac5abb..30bebbc 100644
--- a/test/mock/pixel-xl.cc
+++ b/test/mock/pixel-xl.cc
@@ -24,6 +24,21 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -110,6 +125,21 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -202,6 +232,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/pixel.cc b/test/mock/pixel.cc
index eef43d6..8ee7017 100644
--- a/test/mock/pixel.cc
+++ b/test/mock/pixel.cc
@@ -24,6 +24,21 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -110,6 +125,21 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -202,6 +232,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/xiaomi-mi-5c.cc b/test/mock/xiaomi-mi-5c.cc
index f35b6de..fd3975c 100644
--- a/test/mock/xiaomi-mi-5c.cc
+++ b/test/mock/xiaomi-mi-5c.cc
@@ -24,6 +24,25 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -118,6 +137,25 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -205,6 +243,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/xiaomi-redmi-2a.cc b/test/mock/xiaomi-redmi-2a.cc
index ad38aa0..0020530 100644
--- a/test/mock/xiaomi-redmi-2a.cc
+++ b/test/mock/xiaomi-redmi-2a.cc
@@ -24,6 +24,22 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -102,6 +118,22 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 4:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -176,6 +208,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}
diff --git a/test/mock/xiaomi-redmi-note-3.cc b/test/mock/xiaomi-redmi-note-3.cc
index 61988c6..628ba84 100644
--- a/test/mock/xiaomi-redmi-note-3.cc
+++ b/test/mock/xiaomi-redmi-note-3.cc
@@ -24,6 +24,23 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -114,6 +131,23 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -221,6 +255,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/xiaomi-redmi-note-4.cc b/test/mock/xiaomi-redmi-note-4.cc
index 9f6c137..609ab21 100644
--- a/test/mock/xiaomi-redmi-note-4.cc
+++ b/test/mock/xiaomi-redmi-note-4.cc
@@ -24,6 +24,25 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -118,6 +137,25 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -192,6 +230,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/xperia-c4-dual.cc b/test/mock/xperia-c4-dual.cc
index b415ac0..5ed0050 100644
--- a/test/mock/xperia-c4-dual.cc
+++ b/test/mock/xperia-c4-dual.cc
@@ -24,6 +24,25 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_processor(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -118,6 +137,25 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ switch (i) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ ASSERT_EQ(cpuinfo_get_cluster(1), cpuinfo_get_core(i)->cluster);
+ break;
+ }
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -192,6 +230,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(2, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
#if CPUINFO_ARCH_ARM
ASSERT_TRUE(cpuinfo_has_arm_thumb());
diff --git a/test/mock/xperia-sl.cc b/test/mock/xperia-sl.cc
index 5478c48..ec9d0ad 100644
--- a/test/mock/xperia-sl.cc
+++ b/test/mock/xperia-sl.cc
@@ -24,6 +24,12 @@
}
}
+TEST(PROCESSORS, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_processor(i)->cluster);
+ }
+}
+
TEST(PROCESSORS, package) {
for (uint32_t i = 0; i < cpuinfo_get_processors_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_processor(i)->package);
@@ -92,6 +98,12 @@
}
}
+TEST(CORES, cluster) {
+ for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
+ ASSERT_EQ(cpuinfo_get_cluster(0), cpuinfo_get_core(i)->cluster);
+ }
+}
+
TEST(CORES, package) {
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
ASSERT_EQ(cpuinfo_get_package(0), cpuinfo_get_core(i)->package);
@@ -166,6 +178,18 @@
}
}
+TEST(PACKAGES, cluster_start) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(0, cpuinfo_get_package(i)->cluster_start);
+ }
+}
+
+TEST(PACKAGES, cluster_count) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ(1, cpuinfo_get_package(i)->cluster_count);
+ }
+}
+
TEST(ISA, thumb) {
ASSERT_TRUE(cpuinfo_has_arm_thumb());
}