Catch SkRuntimeEffects w/o "main" earlier

Previously, these would produce a "valid" effect object, but it wouldn't
draw anything.

Bug: oss-fuzz:24070
Change-Id: I17d0ed1710196853da0694cac9f4c260312700a9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304064
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
diff --git a/tests/SkRuntimeEffectTest.cpp b/tests/SkRuntimeEffectTest.cpp
index e7aeb3f..b3a5522 100644
--- a/tests/SkRuntimeEffectTest.cpp
+++ b/tests/SkRuntimeEffectTest.cpp
@@ -56,6 +56,9 @@
     test("layout(marker=local_to_world) uniform float3x3 localToWorld;", "", "float4x4");
 
     test("half missing();", "color.r = missing();", "undefined function");
+
+    // Shouldn't be possible to create an SkRuntimeEffect without "main"
+    test("//", "", "main");
 }
 
 class TestEffect {