@@ -25,10 +25,10 @@ func TestParseTestsFromLLMResponse_DirectUnmarshal(t *testing.T) {
2525 if result [0 ].TestInput != "input" {
2626 t .Errorf ("ParseTestsFromLLMResponse() TestInput mismatch. Expected: 'input', Got: '%s'" , result [0 ].TestInput )
2727 }
28- if result [0 ].Scenario == nil || * result [ 0 ]. Scenario != "test" {
28+ if result [0 ].Scenario != "test" {
2929 t .Errorf ("ParseTestsFromLLMResponse() Scenario mismatch" )
3030 }
31- if result [0 ].Reasoning == nil || * result [ 0 ]. Reasoning != "reason" {
31+ if result [0 ].Reasoning != "reason" {
3232 t .Errorf ("ParseTestsFromLLMResponse() Reasoning mismatch" )
3333 }
3434 })
@@ -210,12 +210,12 @@ func TestParseTestsFromLLMResponse_SpecialValues(t *testing.T) {
210210 t .Errorf ("ParseTestsFromLLMResponse() expected 1 test, got %d" , len (result ))
211211 }
212212
213- // Null values should not set the pointer fields
214- if result [0 ].Scenario != nil {
215- t .Errorf ("ParseTestsFromLLMResponse() Scenario should be nil for null value" )
213+ // Null values should result in empty strings with non- pointer fields
214+ if result [0 ].Scenario != "" {
215+ t .Errorf ("ParseTestsFromLLMResponse() Scenario should be empty for null value" )
216216 }
217- if result [0 ].Reasoning != nil {
218- t .Errorf ("ParseTestsFromLLMResponse() Reasoning should be nil for null value" )
217+ if result [0 ].Reasoning != "" {
218+ t .Errorf ("ParseTestsFromLLMResponse() Reasoning should be empty for null value" )
219219 }
220220 if result [0 ].TestInput != "test" {
221221 t .Errorf ("ParseTestsFromLLMResponse() TestInput mismatch" )
@@ -234,13 +234,13 @@ func TestParseTestsFromLLMResponse_SpecialValues(t *testing.T) {
234234 }
235235
236236 // Empty strings should set the fields to empty strings
237- if result [0 ].Scenario == nil || * result [ 0 ]. Scenario != "" {
237+ if result [0 ].Scenario != "" {
238238 t .Errorf ("ParseTestsFromLLMResponse() Scenario should be empty string" )
239239 }
240240 if result [0 ].TestInput != "" {
241241 t .Errorf ("ParseTestsFromLLMResponse() TestInput should be empty string" )
242242 }
243- if result [0 ].Reasoning == nil || * result [ 0 ]. Reasoning != "" {
243+ if result [0 ].Reasoning != "" {
244244 t .Errorf ("ParseTestsFromLLMResponse() Reasoning should be empty string" )
245245 }
246246 })
@@ -256,7 +256,7 @@ func TestParseTestsFromLLMResponse_SpecialValues(t *testing.T) {
256256 t .Errorf ("ParseTestsFromLLMResponse() expected 1 test, got %d" , len (result ))
257257 }
258258
259- if result [0 ].Scenario == nil || * result [ 0 ]. Scenario != "unicode test 🚀" {
259+ if result [0 ].Scenario != "unicode test 🚀" {
260260 t .Errorf ("ParseTestsFromLLMResponse() unicode scenario failed" )
261261 }
262262 if result [0 ].TestInput != "测试输入 with émojis 🎉" {
@@ -301,7 +301,7 @@ func TestParseTestsFromLLMResponse_RealWorldExamples(t *testing.T) {
301301 if test .TestInput == "" {
302302 t .Errorf ("ParseTestsFromLLMResponse() test %d has empty TestInput" , i )
303303 }
304- if test .Scenario == nil || * test . Scenario == "" {
304+ if test .Scenario == "" {
305305 t .Errorf ("ParseTestsFromLLMResponse() test %d has empty Scenario" , i )
306306 }
307307 }
@@ -328,10 +328,10 @@ func TestParseTestsFromLLMResponse_RealWorldExamples(t *testing.T) {
328328 t .Errorf ("ParseTestsFromLLMResponse() expected 1 test, got %d" , len (result ))
329329 }
330330
331- if result [0 ].Scenario == nil || * result [ 0 ]. Scenario != "API request validation" {
331+ if result [0 ].Scenario != "API request validation" {
332332 t .Errorf ("ParseTestsFromLLMResponse() concatenation failed in scenario" )
333333 }
334- if result [0 ].Reasoning == nil || * result [ 0 ]. Reasoning != "Tests API endpoint validation" {
334+ if result [0 ].Reasoning != "Tests API endpoint validation" {
335335 t .Errorf ("ParseTestsFromLLMResponse() concatenation failed in reasoning" )
336336 }
337337 })
0 commit comments