third_party/fuchsia: Pull in fit::function tests

Sync function_tests.cc so Pigweed can run the fit::function tests in its
environment.

Change-Id: I920af7f8b88967fcd6620bd41d32e63a76d5d93b
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/109716
Commit-Queue: Wyatt Hepler <hepler@google.com>
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Reviewed-by: Rob Mohr <mohrr@google.com>
diff --git a/third_party/fuchsia/copy.bara.sky b/third_party/fuchsia/copy.bara.sky
index 5d5414c..aa53b22 100644
--- a/third_party/fuchsia/copy.bara.sky
+++ b/third_party/fuchsia/copy.bara.sky
@@ -20,6 +20,7 @@
     "sdk/lib/fit/include/lib/fit/nullable.h",
     "sdk/lib/fit/include/lib/fit/traits.h",
     "sdk/lib/fit/include/lib/fit/utility_internal.h",
+    "sdk/lib/fit/test/function_tests.cc",
     # stdcompat
     "sdk/lib/stdcompat/include/lib/stdcompat/optional.h",
     "sdk/lib/stdcompat/include/lib/stdcompat/type_traits.h",
@@ -53,6 +54,8 @@
         core.move("", "third_party/fuchsia/repo"),
         # Apply the patch file created by generate_fuchsia_patch.py.
         patch.apply(["pigweed_adaptations.patch"]),
+        # Replace test #includes with gtest.
+        core.replace("#include <zxtest/zxtest.h>", "#include \"gtest/gtest.h\""),
         # Show all commits but exclude the author to reduce line length.
         metadata.squash_notes(
             "third_party/fuchsia: Copybara import of the fit library\n\n",