| 96 | }; |
| 97 | |
| 98 | TEST_F(ComputeConstantTest, ScalarInt32Literal) { |
| 99 | for (ClientType client_type : client_types) { |
| 100 | Client* client = ClientOrDie(platform_, client_type); |
| 101 | XlaBuilder b(TestName()); |
| 102 | auto computation = ConstantR0<int32>(&b, 42); |
| 103 | EXPECT_TRUE(IsConstant(computation, &b)); |
| 104 | |
| 105 | auto value = ComputeConstantScalar<int32>(client, computation, &b); |
| 106 | ASSERT_TRUE(value.ok()) << value.status(); |
| 107 | EXPECT_EQ(value.ValueOrDie(), 42); |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | TEST_F(ComputeConstantTest, ScalarFloatAdd) { |
| 112 | for (ClientType client_type : client_types) { |
nothing calls this directly
no test coverage detected