Skip to content

Commit 2831dd9

Browse files
committed
Fix JSON field names in PromptPexTest and test generation output for consistency
1 parent 59ca252 commit 2831dd9

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

cmd/generate/pipeline.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ Return only a JSON array with this exact format:
275275
[
276276
{
277277
"scenario": "Description of what this test validates",
278-
"testinput": "The actual input text or data",
278+
"testInput": "The actual input text or data",
279279
"reasoning": "Why this test is important and what it validates"
280280
}
281281
]

cmd/generate/types.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,13 @@ type PromptPexContext struct {
5050

5151
// PromptPexTest represents a single test case
5252
type PromptPexTest struct {
53-
RuleID int `json:"ruleid,omitempty" yaml:"ruleid,omitempty"`
54-
TestID int `json:"testid,omitempty" yaml:"testid,omitempty"`
55-
Baseline bool `json:"baseline,omitempty" yaml:"baseline,omitempty"`
53+
RuleID int `json:"ruleId,omitempty" yaml:"ruleId,omitempty"`
54+
TestID int `json:"testId,omitempty" yaml:"testId,omitempty"`
5655
GroundtruthModel string `json:"groundtruthModel,omitempty" yaml:"groundtruthModel,omitempty"`
5756
Groundtruth string `json:"groundtruth,omitempty" yaml:"groundtruth,omitempty"`
58-
TestInput string `json:"testinput" yaml:"testinput"`
59-
TestInputOriginal string `json:"testinputOriginal,omitempty" yaml:"testinputOriginal,omitempty"`
60-
ExpectedOutput string `json:"expectedoutput,omitempty" yaml:"expectedoutput,omitempty"`
57+
TestInput string `json:"testInput" yaml:"testInput"`
58+
TestInputOriginal string `json:"testInputOriginal,omitempty" yaml:"testInputOriginal,omitempty"`
59+
ExpectedOutput string `json:"expectedOutput,omitempty" yaml:"expectedOutput,omitempty"`
6160
Reasoning string `json:"reasoning,omitempty" yaml:"reasoning,omitempty"`
6261
Scenario string `json:"scenario,omitempty" yaml:"scenario,omitempty"`
6362
}

0 commit comments

Comments
 (0)