From 1a9c7a88e696556ee96c72b0555c230971c02373 Mon Sep 17 00:00:00 2001
From: Mike <jmstall@microsoft.com>
Date: Sat, 1 Mar 2025 15:54:52 -0800
Subject: [PATCH] Example test demonstrating failure.

---
 .../TypeSystemTests/LazyTypeTests.cs          | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/src/tests/Microsoft.PowerFx.Core.Tests.Shared/TypeSystemTests/LazyTypeTests.cs b/src/tests/Microsoft.PowerFx.Core.Tests.Shared/TypeSystemTests/LazyTypeTests.cs
index 27a64d159e..c70ac8f4e3 100644
--- a/src/tests/Microsoft.PowerFx.Core.Tests.Shared/TypeSystemTests/LazyTypeTests.cs
+++ b/src/tests/Microsoft.PowerFx.Core.Tests.Shared/TypeSystemTests/LazyTypeTests.cs
@@ -117,6 +117,35 @@ public void KindString()
             Assert.Equal("Record (TestType)", _lazyRecord1._type.GetKindString());
         }
 
+        [Fact]
+        public void Log()
+        {
+            _getter1CalledCount = 0;
+
+            var symbols = new SymbolTable();
+            symbols.AddVariable("r", _lazyRecord1);
+
+            var check = new CheckResult(new Engine())
+                .SetText("r.Foo * 2")
+                .SetBindingInfo(symbols);
+
+            int c1 = _getter1CalledCount;
+            Assert.Equal(0, c1);
+
+            // This will parse, bind and do work.
+            check.ApplyErrors();
+            int c2 = _getter1CalledCount;
+            Assert.Equal(1, c1 + 1); // only does 1 lookup based on the expression.
+
+            Assert.True(check.IsSuccess);
+
+            // Logging shouldn't make any more calls. 
+            var log = check.ApplyGetLogging();
+
+            int c3 = _getter1CalledCount;
+            Assert.Equal(c2, c3); 
+        }
+
         [Fact]
         public void AcceptsSimple()
         {