[spirv-reader] Test EmitFunctionDeclaration

Tests FunctionEmitter directly.
This is mostly refactoring to be able to selectively run parts of the
parsing flow, and to access relevant internal data.

Bug: tint:3
Change-Id: Ic2b166a2e9623a7e30e6769806088d12e78dcf45
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18704
Reviewed-by: dan sinclair <dsinclair@google.com>
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f8c57cd..456661e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -328,6 +328,7 @@
   list(APPEND TINT_TEST_SRCS
     reader/spirv/enum_converter_test.cc
     reader/spirv/fail_stream_test.cc
+    reader/spirv/function_decl_test.cc
     reader/spirv/namer_test.cc
     reader/spirv/parser_impl_convert_member_decoration_test.cc
     reader/spirv/parser_impl_convert_type_test.cc