diff --git a/src/tint/resolver/const_eval_builtin_test.cc b/src/tint/resolver/const_eval_builtin_test.cc
index 21e6170..4b0ff0b 100644
--- a/src/tint/resolver/const_eval_builtin_test.cc
+++ b/src/tint/resolver/const_eval_builtin_test.cc
@@ -349,9 +349,9 @@
         // Vector tests
         C({Vec(T(0.0), T(0.9), -T(0.9))}, Vec(T(0.0), T(1.4722193), -T(1.4722193))).FloatComp(),
 
-        E({1.1_a},
+        E({T(1.1)},
           "12:34 error: atanh must be called with a value in the range (-1 .. 1) (exclusive)"),
-        E({-1.1_a},
+        E({-T(1.1)},
           "12:34 error: atanh must be called with a value in the range (-1 .. 1) (exclusive)"),
     };
 }
@@ -375,9 +375,9 @@
         // Vector tests
         C({Vec(T(1.0), -T(1.0))}, Vec(T(0), kPi<T>)).FloatComp(),
 
-        E({1.1_a},
+        E({T(1.1)},
           "12:34 error: acos must be called with a value in the range [-1 .. 1] (inclusive)"),
-        E({-1.1_a},
+        E({-T(1.1)},
           "12:34 error: acos must be called with a value in the range [-1 .. 1] (inclusive)"),
     };
 }
@@ -399,8 +399,8 @@
         C({Vec(T(1.0), T(11.5919532755))}, Vec(T(0), kPi<T>)).FloatComp(),
 
         E({T::Smallest()}, "12:34 error: acosh must be called with a value >= 1.0"),
-        E({-1.1_a}, "12:34 error: acosh must be called with a value >= 1.0"),
-        E({0_a}, "12:34 error: acosh must be called with a value >= 1.0"),
+        E({-T(1.1)}, "12:34 error: acosh must be called with a value >= 1.0"),
+        E({T(0)}, "12:34 error: acosh must be called with a value >= 1.0"),
     };
 }
 INSTANTIATE_TEST_SUITE_P(  //
@@ -424,9 +424,9 @@
         // Vector tests
         C({Vec(T(0.0), T(1.0), -T(1.0))}, Vec(T(0.0), kPiOver2<T>, -kPiOver2<T>)).FloatComp(),
 
-        E({1.1_a},
+        E({T(1.1)},
           "12:34 error: asin must be called with a value in the range [-1 .. 1] (inclusive)"),
-        E({-1.1_a},
+        E({-T(1.1)},
           "12:34 error: asin must be called with a value in the range [-1 .. 1] (inclusive)"),
     };
 }
@@ -1452,6 +1452,10 @@
 
 template <typename T>
 std::vector<Case> SmoothstepCases() {
+    auto error_msg = [](auto a, const char* op, auto b) {
+        return "12:34 error: " + OverflowErrorMessage(a, op, b) + R"(
+12:34 note: when calculating smoothstep)";
+    };
     return {
         // t == 0
         C({T(4), T(6), T(2)}, T(0)),
@@ -1462,6 +1466,13 @@
 
         // Vector tests
         C({Vec(T(4), T(4)), Vec(T(6), T(6)), Vec(T(2), T(8))}, Vec(T(0), T(1))),
+
+        // `x - low` underflows
+        E({T::Highest(), T(1), T::Lowest()}, error_msg(T::Lowest(), "-", T::Highest())),
+        // `high - low` underflows
+        E({T::Highest(), T::Lowest(), T(0)}, error_msg(T::Lowest(), "-", T::Highest())),
+        // Divide by zero on `(x - low) / (high - low)`
+        E({T(0), T(0), T(0)}, error_msg(T(0), "/", T(0))),
     };
 }
 INSTANTIATE_TEST_SUITE_P(  //
@@ -1473,68 +1484,6 @@
                                               SmoothstepCases<f16>()))));
 
 template <typename T>
-std::vector<Case> SmoothstepAFloatErrorCases() {
-    auto error_msg = [](auto a, const char* op, auto b) {
-        return "12:34 error: " + OverflowErrorMessage(a, op, b) + R"(
-12:34 note: when calculating smoothstep)";
-    };
-
-    return {// `x - low` underflows
-            E({T::Highest(), T(1), T::Lowest()}, error_msg(T::Lowest(), "-", T::Highest())),
-            // `high - low` underflows
-            E({T::Highest(), T::Lowest(), T(0)}, error_msg(T::Lowest(), "-", T::Highest())),
-            // Divid by zero on `(x - low) / (high - low)`
-            E({T(0), T(0), T(0)}, error_msg(T(0), "/", T(0)))};
-}
-INSTANTIATE_TEST_SUITE_P(  //
-    SmoothstepAFloatError,
-    ResolverConstEvalBuiltinTest,
-    testing::Combine(testing::Values(sem::BuiltinType::kSmoothstep),
-                     testing::ValuesIn(SmoothstepAFloatErrorCases<AFloat>())));
-
-template <typename T>
-std::vector<Case> SmoothstepF16ErrorCases() {
-    auto error_msg = [](auto a, const char* op, auto b) {
-        return "12:34 error: " + OverflowErrorMessage(a, op, b) + R"(
-12:34 note: when calculating smoothstep)";
-    };
-
-    return {// `x - low` underflows
-            E({T::Highest(), T(1), T::Lowest()}, error_msg(T::Lowest(), "-", T::Highest())),
-            // `high - low` underflows
-            E({T::Highest(), T::Lowest(), T(0)}, error_msg(T::Lowest(), "-", T::Highest())),
-            // Divid by zero on `(x - low) / (high - low)`
-            E({T(0), T(0), T(0)}, error_msg(T(0), "/", T(0)))};
-}
-// TODO(crbug.com/tint/1581): Enable when non-abstract math is checked.
-INSTANTIATE_TEST_SUITE_P(  //
-    DISABLED_SmoothstepF16Error,
-    ResolverConstEvalBuiltinTest,
-    testing::Combine(testing::Values(sem::BuiltinType::kSmoothstep),
-                     testing::ValuesIn(SmoothstepF16ErrorCases<f16>())));
-
-template <typename T>
-std::vector<Case> SmoothstepF32ErrorCases() {
-    auto error_msg = [](auto a, const char* op, auto b) {
-        return "12:34 error: " + OverflowErrorMessage(a, op, b) + R"(
-12:34 note: when calculating smoothstep)";
-    };
-
-    return {// `x - low` underflows
-            E({T::Highest(), T(1), T::Lowest()}, error_msg(T::Lowest(), "-", T::Highest())),
-            // `high - low` underflows
-            E({T::Highest(), T::Lowest(), T(0)}, error_msg(T::Lowest(), "-", T::Highest())),
-            // Divid by zero on `(x - low) / (high - low)`
-            E({T(0), T(0), T(0)}, error_msg(T(0), "/", T(0)))};
-}
-// TODO(crbug.com/tint/1581): Enable when non-abstract math is checked.
-INSTANTIATE_TEST_SUITE_P(  //
-    DISABLED_SmoothstepF32Error,
-    ResolverConstEvalBuiltinTest,
-    testing::Combine(testing::Values(sem::BuiltinType::kSmoothstep),
-                     testing::ValuesIn(SmoothstepF32ErrorCases<f32>())));
-
-template <typename T>
 std::vector<Case> StepCases() {
     return {
         C({T(0), T(0)}, T(1.0)),
