MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / TestScan_NilAST

Function TestScan_NilAST

pkg/sql/security/scanner_test.go:53–62  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

51}
52
53func TestScan_NilAST(t *testing.T) {
54 scanner := NewScanner()
55 result := scanner.Scan(nil)
56 if result == nil {
57 t.Fatal("Scan returned nil for nil AST")
58 }
59 if len(result.Findings) != 0 {
60 t.Errorf("expected 0 findings for nil AST, got %d", len(result.Findings))
61 }
62}
63
64func TestScan_EmptyAST(t *testing.T) {
65 scanner := NewScanner()

Callers

nothing calls this directly

Calls 3

ScanMethod · 0.95
NewScannerFunction · 0.85
ErrorfMethod · 0.65

Tested by

no test coverage detected