[spirv-reader] Fix SPIR-V assembly, re-enable test

Fix typos in SPIR-V IDs that were causing the optimizer to assert
out when building up its internal data structures.

Bug: tint:3
Change-Id: I27210623b0d3d241dbd6afe6bef63e88a02b390e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18640
Reviewed-by: dan sinclair <dsinclair@google.com>
diff --git a/src/reader/spirv/parser_impl_function_decl_test.cc b/src/reader/spirv/parser_impl_function_decl_test.cc
index 3314bfc..6e29906 100644
--- a/src/reader/spirv/parser_impl_function_decl_test.cc
+++ b/src/reader/spirv/parser_impl_function_decl_test.cc
@@ -122,11 +122,11 @@
   })"));
 }
 
-TEST_F(SpvParserTest, DISABLED_EmitFunctions_NonVoidResultType) {
+TEST_F(SpvParserTest, EmitFunctions_NonVoidResultType) {
   auto p = parser(test::Assemble(Names({"ret_float"}) + CommonTypes() + R"(
      %fn_ret_float = OpTypeFunction %float
 
-     %ret_float = OpFunction %float None %nf_ret_float
+     %ret_float = OpFunction %float None %fn_ret_float
      %ret_float_entry = OpLabel
      OpReturnValue %float_0
      OpFunctionEnd
diff --git a/src/reader/spirv/parser_impl_module_var_test.cc b/src/reader/spirv/parser_impl_module_var_test.cc
index 3082720..d9f4882 100644
--- a/src/reader/spirv/parser_impl_module_var_test.cc
+++ b/src/reader/spirv/parser_impl_module_var_test.cc
@@ -49,12 +49,12 @@
   EXPECT_THAT(p->error(), HasSubstr("unknown SPIR-V storage class: 5"));
 }
 
-TEST_F(SpvParserTest, DISABLED_ModuleScopeVar_BadPointerType) {
+TEST_F(SpvParserTest, ModuleScopeVar_BadPointerType) {
   auto p = parser(test::Assemble(R"(
     %float = OpTypeFloat 32
     %fn_ty = OpTypeFunction %float
-    %fn_ptr_ty = OpTypePointer Private %fn_ty
-    %52 = OpVariable %ptr Private
+    %3 = OpTypePointer Private %fn_ty
+    %52 = OpVariable %3 Private
   )"));
   EXPECT_TRUE(p->BuildInternalModule());
   // Normally we should run ParserImpl::RegisterTypes before emitting
@@ -62,7 +62,7 @@
   // us catch this error.
   EXPECT_FALSE(p->EmitModuleScopeVariables());
   EXPECT_THAT(p->error(), HasSubstr("internal error: failed to register Tint "
-                                    "AST type for SPIR-V type with ID: 4"));
+                                    "AST type for SPIR-V type with ID: 3"));
 }
 
 TEST_F(SpvParserTest, ModuleScopeVar_AnonWorkgroupVar) {