mirror of
https://github.com/github/semantic.git
synced 2025-01-05 14:11:33 +03:00
commit
e07166bd8f
@ -159,6 +159,16 @@ data Category
|
||||
| HashSplatParameter
|
||||
-- | A block parameter, e.g. def foo(&block) in Ruby.
|
||||
| BlockParameter
|
||||
-- | A float literal.
|
||||
| FloatLiteral
|
||||
-- | An array type declaration, e.g. [2]string in Go.
|
||||
| ArrayTy
|
||||
-- | A dictionary type declaration, e.g. map[string] in Go.
|
||||
| DictionaryTy
|
||||
-- | A Struct type declaration, struct Foo {..} in Go.
|
||||
| StructTy
|
||||
-- | A Struct constructor, e.g. foo = Foo {..} in Go.
|
||||
| Struct
|
||||
-- | A break statement, e.g. break; in JavaScript.
|
||||
| Break
|
||||
-- | A continue statement, e.g. continue; in JavaScript.
|
||||
@ -181,6 +191,37 @@ data Category
|
||||
| BeginBlock
|
||||
-- | An END {} block of statements.
|
||||
| EndBlock
|
||||
| ParameterDecl
|
||||
-- | A default case in a switch statement.
|
||||
| DefaultCase
|
||||
-- | A type declaration.
|
||||
| TypeDecl
|
||||
| PointerTy
|
||||
-- | A field declaration.
|
||||
| FieldDecl
|
||||
-- | A slice type, e.g. []string{"hello"} in Go.
|
||||
| SliceTy
|
||||
-- | An element of a slice literal.
|
||||
| Element
|
||||
-- | A literal value.
|
||||
| Literal
|
||||
-- | A channel type in Go.
|
||||
| ChannelTy
|
||||
-- | A send statement in Go.
|
||||
| Send
|
||||
-- | An Index expression, e.g. x[1] in Go.
|
||||
| IndexExpression
|
||||
-- | A function type.
|
||||
| FunctionTy
|
||||
-- | An increment statement, e.g. i++ in Go.
|
||||
| IncrementStatement
|
||||
-- | A decrement statement, e.g. i-- in Go.
|
||||
| DecrementStatement
|
||||
-- | A qualified identifier, e.g. Module.function in Go.
|
||||
| QualifiedIdentifier
|
||||
| FieldDeclarations
|
||||
-- | A Go rune literal.
|
||||
| RuneLiteral
|
||||
deriving (Eq, Generic, Ord, Show)
|
||||
|
||||
-- Instances
|
||||
@ -224,9 +265,11 @@ instance Listable Category where
|
||||
\/ cons0 DoWhile
|
||||
\/ cons0 While
|
||||
\/ cons0 Switch
|
||||
\/ cons0 If
|
||||
\/ cons0 Ternary
|
||||
\/ cons0 Case
|
||||
\/ cons0 Operator
|
||||
\/ cons0 CommaOperator
|
||||
\/ cons0 Object
|
||||
\/ cons0 Throw
|
||||
\/ cons0 Constructor
|
||||
@ -235,9 +278,13 @@ instance Listable Category where
|
||||
\/ cons0 Finally
|
||||
\/ cons0 Class
|
||||
\/ cons0 Method
|
||||
\/ cons0 Comment
|
||||
\/ cons0 RelationalOperator
|
||||
\/ cons0 Empty
|
||||
\/ cons0 Module
|
||||
\/ cons0 Import
|
||||
\/ cons0 Export
|
||||
\/ cons0 AnonymousFunction
|
||||
\/ cons0 Interpolation
|
||||
\/ cons0 Subshell
|
||||
\/ cons0 OperatorAssignment
|
||||
@ -266,6 +313,11 @@ instance Listable Category where
|
||||
\/ cons0 SplatParameter
|
||||
\/ cons0 HashSplatParameter
|
||||
\/ cons0 BlockParameter
|
||||
\/ cons0 FloatLiteral
|
||||
\/ cons0 ArrayTy
|
||||
\/ cons0 DictionaryTy
|
||||
\/ cons0 StructTy
|
||||
\/ cons0 Struct
|
||||
\/ cons0 Break
|
||||
\/ cons0 Continue
|
||||
\/ cons0 Binary
|
||||
@ -273,4 +325,25 @@ instance Listable Category where
|
||||
\/ cons0 Constant
|
||||
\/ cons0 Superclass
|
||||
\/ cons0 SingletonClass
|
||||
\/ cons0 RangeExpression
|
||||
\/ cons0 ScopeOperator
|
||||
\/ cons0 BeginBlock
|
||||
\/ cons0 EndBlock
|
||||
\/ cons0 ParameterDecl
|
||||
\/ cons0 DefaultCase
|
||||
\/ cons0 TypeDecl
|
||||
\/ cons0 PointerTy
|
||||
\/ cons0 FieldDecl
|
||||
\/ cons0 SliceTy
|
||||
\/ cons0 Element
|
||||
\/ cons0 Literal
|
||||
\/ cons0 ChannelTy
|
||||
\/ cons0 Send
|
||||
\/ cons0 IndexExpression
|
||||
\/ cons0 FunctionTy
|
||||
\/ cons0 IncrementStatement
|
||||
\/ cons0 DecrementStatement
|
||||
\/ cons0 QualifiedIdentifier
|
||||
\/ cons0 FieldDeclarations
|
||||
\/ cons0 RuneLiteral
|
||||
\/ cons1 (Other . unListableText)
|
||||
|
@ -60,7 +60,11 @@ identifiable term = isIdentifiable (unwrap term) term
|
||||
S.Switch{} -> Identifiable
|
||||
S.Rescue{} -> Identifiable
|
||||
S.Pair{} -> Identifiable
|
||||
S.Array ty _ -> maybe Unidentifiable (const Identifiable) ty
|
||||
S.Object ty _ -> maybe Unidentifiable (const Identifiable) ty
|
||||
S.BlockStatement{} -> Identifiable
|
||||
S.TypeDecl{} -> Identifiable
|
||||
S.Ty{} -> Identifiable
|
||||
_ -> Unidentifiable
|
||||
|
||||
data JSONSummary summary span = JSONSummary { summary :: summary, span :: span }
|
||||
@ -167,6 +171,7 @@ toLeafInfos LeafInfo{..} = pure $ JSONSummary (summary leafCategory termName) so
|
||||
C.EndBlock -> categoryName'
|
||||
C.Yield | Text.null termName -> categoryName'
|
||||
C.Return | Text.null termName -> categoryName'
|
||||
C.Switch | Text.null termName -> categoryName'
|
||||
_ -> "the" <+> squotes (toDoc termName) <+> toDoc categoryName
|
||||
where
|
||||
termAndCategoryName = "the" <+> toDoc termName <+> toDoc categoryName
|
||||
@ -180,6 +185,9 @@ toLeafInfos LeafInfo{..} = pure $ JSONSummary (summary leafCategory termName) so
|
||||
-- Returns a text representing a specific term given a source and a term.
|
||||
toTermName :: forall leaf fields. (StringConv leaf Text, DefaultFields fields) => Source Char -> SyntaxTerm leaf fields -> Text
|
||||
toTermName source term = case unwrap term of
|
||||
S.Send _ _ -> termNameFromSource term
|
||||
S.Ty _ -> termNameFromSource term
|
||||
S.TypeDecl id _ -> toTermName' id
|
||||
S.TypeAssertion _ _ -> termNameFromSource term
|
||||
S.TypeConversion _ _ -> termNameFromSource term
|
||||
S.Go expr -> toTermName' expr
|
||||
@ -190,6 +198,7 @@ toTermName source term = case unwrap term of
|
||||
Leaf leaf -> toS leaf
|
||||
S.Assignment identifier _ -> toTermName' identifier
|
||||
S.Function identifier _ _ -> toTermName' identifier
|
||||
S.ParameterDecl _ _ -> termNameFromSource term
|
||||
S.FunctionCall i args -> case unwrap i of
|
||||
S.AnonymousFunction params _ ->
|
||||
-- Omit a function call's arguments if it's arguments match the underlying
|
||||
@ -211,17 +220,20 @@ toTermName source term = case unwrap term of
|
||||
(S.FunctionCall{}, S.FunctionCall{}) -> toTermName' base <> "()." <> toTermName' element <> "()"
|
||||
(S.FunctionCall{}, _) -> toTermName' base <> "()." <> toTermName' element
|
||||
(_, S.FunctionCall{}) -> toTermName' base <> "[" <> toTermName' element <> "()" <> "]"
|
||||
(S.Indexed _, _) -> case category . extract $ base of
|
||||
SliceTy -> termNameFromSource base <> toTermName' element
|
||||
_ -> toTermName' base <> "[" <> toTermName' element <> "]"
|
||||
(_, _) -> toTermName' base <> "[" <> toTermName' element <> "]"
|
||||
S.VarAssignment varId _ -> toTermName' varId
|
||||
S.VarDecl decl -> toTermName' decl
|
||||
S.VarDecl decl _ -> toTermName' decl
|
||||
-- TODO: We should remove Case from Syntax since I don't think we should ever
|
||||
-- evaluate Case as a single toTermName Text - joshvera
|
||||
S.Case expr _ -> termNameFromSource expr
|
||||
S.Switch expr _ -> toTermName' expr
|
||||
S.Switch expr _ -> maybe "" toTermName' expr
|
||||
S.Ternary expr _ -> toTermName' expr
|
||||
S.OperatorAssignment id _ -> toTermName' id
|
||||
S.Operator _ -> termNameFromSource term
|
||||
S.Object kvs -> "{ " <> Text.intercalate ", " (toTermName' <$> kvs) <> " }"
|
||||
S.Object ty kvs -> maybe ("{ " <> Text.intercalate ", " (toTermName' <$> kvs) <> " }") termNameFromSource ty
|
||||
S.Pair k v -> toKeyName k <> toArgName v
|
||||
S.Return children -> Text.intercalate ", " (termNameFromSource <$> children)
|
||||
S.Yield children -> Text.intercalate ", " (termNameFromSource <$> children)
|
||||
@ -234,9 +246,9 @@ toTermName source term = case unwrap term of
|
||||
S.Constructor expr -> toTermName' expr
|
||||
S.Try clauses _ _ _ -> termNameFromChildren term clauses
|
||||
S.Select clauses -> termNameFromChildren term clauses
|
||||
S.Array _ -> termNameFromSource term
|
||||
S.Array ty _ -> maybe (termNameFromSource term) termNameFromSource ty
|
||||
S.Class identifier _ _ -> toTermName' identifier
|
||||
S.Method identifier args _ -> toTermName' identifier <> paramsToArgNames args
|
||||
S.Method identifier _ args _ -> toTermName' identifier <> paramsToArgNames args
|
||||
S.Comment a -> toS a
|
||||
S.Commented _ _ -> termNameFromChildren term (toList $ unwrap term)
|
||||
S.Module identifier _ -> toTermName' identifier
|
||||
@ -246,10 +258,13 @@ toTermName source term = case unwrap term of
|
||||
S.Export (Just identifier) [] -> "{ " <> toTermName' identifier <> " }"
|
||||
S.Export (Just identifier) expr -> "{ " <> Text.intercalate ", " (termNameFromSource <$> expr) <> " }" <> " from " <> toTermName' identifier
|
||||
S.Negate expr -> toTermName' expr
|
||||
S.Struct ty _ -> maybe (termNameFromSource term) termNameFromSource ty
|
||||
S.Rescue args _ -> Text.intercalate ", " $ toTermName' <$> args
|
||||
S.Break expr -> toTermName' expr
|
||||
S.Continue expr -> toTermName' expr
|
||||
S.Break expr -> maybe "" toTermName' expr
|
||||
S.Continue expr -> maybe "" toTermName' expr
|
||||
S.BlockStatement children -> termNameFromChildren term children
|
||||
S.DefaultCase children -> termNameFromChildren term children
|
||||
S.FieldDecl id expr tag -> termNameFromSource id <> (maybe "" (\expr' -> " " <> termNameFromSource expr') expr) <> (maybe "" ((" " <>) . termNameFromSource) tag)
|
||||
where toTermName' = toTermName source
|
||||
termNameFromChildren term children = termNameFromRange (unionRangesFrom (range term) (range <$> children))
|
||||
termNameFromSource term = termNameFromRange (range term)
|
||||
@ -282,10 +297,20 @@ parentContexts contexts = hsep $ either identifiableDoc annotatableDoc <$> conte
|
||||
C.RescueModifier -> "in the" <+> squotes ("rescue" <+> termName t) <+> "modifier"
|
||||
C.If -> "in the" <+> squotes (termName t) <+> catName c
|
||||
C.Case -> "in the" <+> squotes (termName t) <+> catName c
|
||||
C.Switch -> "in the" <+> squotes (termName t) <+> catName c
|
||||
C.Break -> case t of
|
||||
"" -> "in a" <+> catName c
|
||||
_ -> "in the" <+> squotes (termName t) <+> catName c
|
||||
C.Continue -> case t of
|
||||
"" -> "in a" <+> catName c
|
||||
_ -> "in the" <+> squotes (termName t) <+> catName c
|
||||
C.Switch -> case t of
|
||||
"" -> "in a" <+> catName c
|
||||
_ -> "in the" <+> squotes (termName t) <+> catName c
|
||||
C.When -> "in a" <+> catName c
|
||||
C.BeginBlock -> "in a" <+> catName c
|
||||
C.EndBlock -> "in an" <+> catName c
|
||||
C.DefaultCase -> "in a" <+> catName c
|
||||
C.TypeDecl -> "in the" <+> squotes (termName t) <+> catName c
|
||||
_ -> "in the" <+> termName t <+> catName c
|
||||
annotatableDoc (c, t) = "of the" <+> squotes (termName t) <+> catName c
|
||||
catName = toDoc . toCategoryName
|
||||
@ -364,6 +389,7 @@ instance HasCategory Category where
|
||||
Identifier -> "identifier"
|
||||
IntegerLiteral -> "integer"
|
||||
NumberLiteral -> "number"
|
||||
FloatLiteral -> "float"
|
||||
Other s -> s
|
||||
C.Pair -> "pair"
|
||||
C.Params -> "params"
|
||||
@ -409,7 +435,7 @@ instance HasCategory Category where
|
||||
C.Negate -> "negate"
|
||||
C.Select -> "select statement"
|
||||
C.Go -> "go statement"
|
||||
C.Slice -> "slice expression"
|
||||
C.Slice -> "slice literal"
|
||||
C.Defer -> "defer statement"
|
||||
C.TypeAssertion -> "type assertion statement"
|
||||
C.TypeConversion -> "type conversion expression"
|
||||
@ -419,6 +445,10 @@ instance HasCategory Category where
|
||||
C.SplatParameter -> "parameter"
|
||||
C.HashSplatParameter -> "parameter"
|
||||
C.BlockParameter -> "parameter"
|
||||
C.ArrayTy -> "array type"
|
||||
C.DictionaryTy -> "dictionary type"
|
||||
C.StructTy -> "struct type"
|
||||
C.Struct -> "struct"
|
||||
C.Break -> "break statement"
|
||||
C.Continue -> "continue statement"
|
||||
C.Binary -> "binary statement"
|
||||
@ -430,6 +460,23 @@ instance HasCategory Category where
|
||||
C.ScopeOperator -> "scope operator"
|
||||
C.BeginBlock -> "BEGIN block"
|
||||
C.EndBlock -> "END block"
|
||||
C.ParameterDecl -> "parameter declaration"
|
||||
C.DefaultCase -> "default statement"
|
||||
C.TypeDecl -> "type declaration"
|
||||
C.PointerTy -> "pointer type"
|
||||
C.FieldDecl -> "field declaration"
|
||||
C.SliceTy -> "slice type"
|
||||
C.Element -> "element"
|
||||
C.Literal -> "literal"
|
||||
C.ChannelTy -> "channel type"
|
||||
C.Send -> "send statement"
|
||||
C.IndexExpression -> "index expression"
|
||||
C.FunctionTy -> "function type"
|
||||
C.IncrementStatement -> "increment statement"
|
||||
C.DecrementStatement -> "decrement statement"
|
||||
C.QualifiedIdentifier -> "qualified identifier"
|
||||
C.FieldDeclarations -> "field declarations"
|
||||
C.RuneLiteral -> "rune literal"
|
||||
|
||||
instance HasField fields Category => HasCategory (SyntaxTerm leaf fields) where
|
||||
toCategoryName = toCategoryName . category . extract
|
||||
|
@ -49,10 +49,11 @@ diffComparableTerms construct comparable cost getLabel = recur
|
||||
| otherwise = Nothing
|
||||
|
||||
-- | Construct an algorithm to diff a pair of terms.
|
||||
algorithmWithTerms :: (TermF (Syntax leaf) (Both a) diff -> diff)
|
||||
algorithmWithTerms :: Applicative diff
|
||||
=> (TermF (Syntax leaf) (Both a) (diff (Patch (Term (Syntax leaf) a))) -> diff (Patch (Term (Syntax leaf) a)))
|
||||
-> Term (Syntax leaf) a
|
||||
-> Term (Syntax leaf) a
|
||||
-> Algorithm (Term (Syntax leaf) a) diff diff
|
||||
-> Algorithm (Term (Syntax leaf) a) (diff (Patch (Term (Syntax leaf) a))) (diff (Patch (Term (Syntax leaf) a)))
|
||||
algorithmWithTerms construct t1 t2 = maybe (recursively t1 t2) (fmap annotate) $ case (unwrap t1, unwrap t2) of
|
||||
(Indexed a, Indexed b) ->
|
||||
Just $ Indexed <$> bySimilarity a b
|
||||
@ -62,23 +63,40 @@ algorithmWithTerms construct t1 t2 = maybe (recursively t1 t2) (fmap annotate) $
|
||||
S.FunctionCall <$> recursively identifierA identifierB
|
||||
<*> bySimilarity argsA argsB
|
||||
(S.Switch exprA casesA, S.Switch exprB casesB) -> Just $
|
||||
S.Switch <$> recursively exprA exprB
|
||||
S.Switch <$> maybeRecursively exprA exprB
|
||||
<*> bySimilarity casesA casesB
|
||||
(S.Object a, S.Object b) -> Just $ S.Object <$> bySimilarity a b
|
||||
(S.Object tyA a, S.Object tyB b) -> Just $
|
||||
S.Object <$> maybeRecursively tyA tyB
|
||||
<*> bySimilarity a b
|
||||
(Commented commentsA a, Commented commentsB b) -> Just $
|
||||
Commented <$> bySimilarity commentsA commentsB
|
||||
<*> sequenceA (recursively <$> a <*> b)
|
||||
(Array a, Array b) -> Just $ Array <$> bySimilarity a b
|
||||
<*> maybeRecursively a b
|
||||
(Array tyA a, Array tyB b) -> Just $
|
||||
Array <$> maybeRecursively tyA tyB
|
||||
<*> bySimilarity a b
|
||||
(S.Class identifierA paramsA expressionsA, S.Class identifierB paramsB expressionsB) -> Just $
|
||||
S.Class <$> recursively identifierA identifierB
|
||||
<*> sequenceA (recursively <$> paramsA <*> paramsB)
|
||||
<*> maybeRecursively paramsA paramsB
|
||||
<*> bySimilarity expressionsA expressionsB
|
||||
(S.Method identifierA paramsA expressionsA, S.Method identifierB paramsB expressionsB) -> Just $
|
||||
(S.Method identifierA tyA paramsA expressionsA, S.Method identifierB tyB paramsB expressionsB) -> Just $
|
||||
S.Method <$> recursively identifierA identifierB
|
||||
<*> maybeRecursively tyA tyB
|
||||
<*> bySimilarity paramsA paramsB
|
||||
<*> bySimilarity expressionsA expressionsB
|
||||
(S.Function idA paramsA bodyA, S.Function idB paramsB bodyB) -> Just $
|
||||
S.Function <$> recursively idA idB
|
||||
<*> bySimilarity paramsA paramsB
|
||||
<*> bySimilarity bodyA bodyB
|
||||
_ -> Nothing
|
||||
where annotate = construct . (both (extract t1) (extract t2) :<)
|
||||
where
|
||||
annotate = construct . (both (extract t1) (extract t2) :<)
|
||||
|
||||
maybeRecursively :: Applicative f => Maybe a -> Maybe a -> Algorithm a (f (Patch a)) (Maybe (f (Patch a)))
|
||||
maybeRecursively a b = sequenceA $ case (a, b) of
|
||||
(Just a, Just b) -> Just $ recursively a b
|
||||
(Nothing, Just b) -> Just $ pure (inserting b)
|
||||
(Just a, Nothing) -> Just $ pure (deleting a)
|
||||
(Nothing, Nothing) -> Nothing
|
||||
|
||||
-- | Run an algorithm, given functions characterizing the evaluation.
|
||||
runAlgorithm :: (GAlign f, HasField fields Category, Eq (f (Cofree f Category)), Traversable f, Hashable label)
|
||||
|
@ -59,7 +59,7 @@ termConstructor source sourceSpan name range children _ =
|
||||
pure $! cofree ((range .: Other name .: sourceSpan .: RNil) :< syntax)
|
||||
|
||||
toVarDecl :: (HasField fields Category) => Term (S.Syntax Text) (Record fields) -> Term (S.Syntax Text) (Record fields)
|
||||
toVarDecl child = cofree $ setCategory (extract child) VarDecl :< S.VarDecl child
|
||||
toVarDecl child = cofree $ setCategory (extract child) VarDecl :< S.VarDecl child Nothing
|
||||
|
||||
toTuple :: Term (S.Syntax Text) (Record fields) -> [Term (S.Syntax Text) (Record fields)]
|
||||
toTuple child | S.Indexed [key,value] <- unwrap child = [cofree (extract child :< S.Pair key value)]
|
||||
|
@ -20,12 +20,13 @@ termConstructor
|
||||
-> IO (SyntaxTerm Text '[Range, Category, SourceSpan]) -- ^ The resulting term, in IO.
|
||||
termConstructor source sourceSpan name range children _ = case name of
|
||||
"return_statement" -> withDefaultInfo $ S.Return children
|
||||
"source_file" -> case children of
|
||||
packageName : rest | category (extract packageName) == Other "package_clause" ->
|
||||
case unwrap packageName of
|
||||
S.Indexed [id] -> withCategory Module (S.Module id rest)
|
||||
_ -> withCategory Error (S.Error children)
|
||||
_ -> withCategory Error (S.Error children)
|
||||
"source_file" -> case Prologue.break (\node -> category (extract node) == Other "package_clause") children of
|
||||
(comments, packageName : rest) -> case unwrap packageName of
|
||||
S.Indexed [id] -> do
|
||||
module' <- withCategory Module (S.Module id rest)
|
||||
withCategory Program (S.Indexed (comments <> [module']))
|
||||
_ -> withRanges range Error children (S.Error children)
|
||||
_ -> withRanges range Error children (S.Error children)
|
||||
"import_declaration" -> toImports children
|
||||
"function_declaration" -> withDefaultInfo $ case children of
|
||||
[id, params, block] -> S.Function id (toList $ unwrap params) (toList $ unwrap block)
|
||||
@ -39,17 +40,36 @@ termConstructor source sourceSpan name range children _ = case name of
|
||||
[rangeClause, body] | category (extract rangeClause) == Other "range_clause" ->
|
||||
S.For (toList $ unwrap rangeClause) (toList $ unwrap body)
|
||||
other -> S.Error other
|
||||
"type_declaration" -> toTypeDecls children
|
||||
"type_spec" -> toTypeDecl children
|
||||
"struct_type" -> toStructTy children
|
||||
"field_declaration" -> toFieldDecl children
|
||||
"expression_switch_statement" ->
|
||||
case Prologue.break isCaseClause children of
|
||||
(clauses, cases) -> do
|
||||
clauses' <- withDefaultInfo $ S.Indexed clauses
|
||||
withDefaultInfo $ S.Switch clauses' cases
|
||||
where isCaseClause = (== Case) . category . extract
|
||||
clauses' <- case clauses of
|
||||
[] -> pure Nothing
|
||||
clauses'' -> Just <$> (withCategory ExpressionStatements (S.Indexed clauses''))
|
||||
cases' <- sequenceA $ toCase <$> cases
|
||||
withDefaultInfo $ S.Switch clauses' cases'
|
||||
where
|
||||
isCaseClause = (== Other "expression_case_clause") . category . extract
|
||||
toCase clause = case toList (unwrap clause) of
|
||||
clause' : rest -> case toList (unwrap clause') of
|
||||
[clause''] -> withCategory Case $ S.Case clause'' rest
|
||||
[] -> withCategory DefaultCase $ S.DefaultCase rest
|
||||
rest -> withCategory Error $ S.Error rest
|
||||
[] -> withCategory Error $ S.Error [clause]
|
||||
"parameter_declaration" -> withDefaultInfo $ case children of
|
||||
[param, ty] -> S.ParameterDecl (Just ty) param
|
||||
[param] -> S.ParameterDecl Nothing param
|
||||
_ -> S.Error children
|
||||
"assignment_statement" -> toVarAssignment children
|
||||
"type_switch_statement" ->
|
||||
case Prologue.break isCaseClause children of
|
||||
(clauses, cases) ->
|
||||
withDefaultInfo $ case clauses of
|
||||
[id] -> S.Switch id cases
|
||||
[id] -> S.Switch (Just id) cases
|
||||
_ -> S.Error children
|
||||
where isCaseClause = (== Case) . category . extract
|
||||
"select_statement" -> withDefaultInfo $ S.Select (toCommunicationCase =<< children)
|
||||
@ -59,6 +79,7 @@ termConstructor source sourceSpan name range children _ = case name of
|
||||
"selector_expression" -> withDefaultInfo $ toSubscriptAccess children
|
||||
"index_expression" -> withDefaultInfo $ toSubscriptAccess children
|
||||
"slice_expression" -> sliceToSubscriptAccess children
|
||||
"composite_literal" -> toLiteral children
|
||||
"type_assertion_expression" -> withDefaultInfo $ case children of
|
||||
[a, b] -> S.TypeAssertion a b
|
||||
rest -> S.Error rest
|
||||
@ -66,20 +87,115 @@ termConstructor source sourceSpan name range children _ = case name of
|
||||
[a, b] -> S.TypeConversion a b
|
||||
rest -> S.Error rest
|
||||
-- TODO: Handle multiple var specs
|
||||
"var_declaration" -> withDefaultInfo . S.Indexed =<< mapM toVarDecl children
|
||||
"short_var_declaration" -> listToVarDecls children
|
||||
"var_declaration" -> toVarDecls children
|
||||
"var_spec" -> toVarAssignment children
|
||||
"short_var_declaration" -> toVarAssignment children
|
||||
"if_statement" -> toIfStatement children
|
||||
"call_expression" -> withDefaultInfo $ case children of
|
||||
[id] -> S.FunctionCall id []
|
||||
id : rest -> S.FunctionCall id rest
|
||||
rest -> S.Error rest
|
||||
"const_declaration" -> toConsts children
|
||||
"const_spec" -> toVarAssignment children
|
||||
"func_literal" -> withDefaultInfo $ case children of
|
||||
[params, _, body] -> S.AnonymousFunction (toList $ unwrap params) (toList $ unwrap body)
|
||||
[params, _, body] -> case toList (unwrap params) of
|
||||
[params'] -> S.AnonymousFunction (toList $ unwrap params') (toList $ unwrap body)
|
||||
rest -> S.Error rest
|
||||
rest -> S.Error rest
|
||||
"pointer_type" -> withDefaultInfo $ case children of
|
||||
[ty] -> S.Ty ty
|
||||
rest -> S.Error rest
|
||||
"channel_type" -> withDefaultInfo $ case children of
|
||||
[ty] -> S.Ty ty
|
||||
rest -> S.Error rest
|
||||
"send_statement" -> withDefaultInfo $ case children of
|
||||
[channel, expr] -> S.Send channel expr
|
||||
rest -> S.Error rest
|
||||
"unary_expression" -> withDefaultInfo $ S.Operator children
|
||||
"function_type" -> do
|
||||
params <- withRanges range Params children $ S.Indexed children
|
||||
withDefaultInfo $ S.Ty params
|
||||
"inc_statement" -> do
|
||||
withDefaultInfo $ S.Leaf . toText $ slice range source
|
||||
"dec_statement" -> do
|
||||
withDefaultInfo $ S.Leaf . toText $ slice range source
|
||||
"qualified_identifier" -> do
|
||||
withDefaultInfo $ S.Leaf . toText $ slice range source
|
||||
"break_statement" -> toBreak children
|
||||
"continue_statement" -> toContinue children
|
||||
"keyed_element" -> toPair children
|
||||
"method_declaration" -> toMethod children
|
||||
_ -> withDefaultInfo $ case children of
|
||||
[] -> S.Leaf . toText $ slice range source
|
||||
_ -> S.Indexed children
|
||||
where
|
||||
toMethod = \case
|
||||
[params, name, fun] -> withDefaultInfo (S.Method name Nothing (toList $ unwrap params) (toList $ unwrap fun))
|
||||
[params, name, outParams, fun] -> do
|
||||
let params' = toList (unwrap params)
|
||||
outParams' = toList (unwrap outParams)
|
||||
allParams = params' <> outParams'
|
||||
withDefaultInfo (S.Method name Nothing allParams (toList $ unwrap fun))
|
||||
[params, name, outParams, ty, fun] -> do
|
||||
let params' = toList (unwrap params)
|
||||
outParams' = toList (unwrap outParams)
|
||||
allParams = params' <> outParams'
|
||||
withDefaultInfo (S.Method name (Just ty) allParams (toList $ unwrap fun))
|
||||
rest -> withCategory Error (S.Error rest)
|
||||
toPair = \case
|
||||
[key, value] -> withDefaultInfo (S.Pair key value)
|
||||
rest -> withCategory Error (S.Error rest)
|
||||
toBreak = \case
|
||||
[label] -> withDefaultInfo (S.Break (Just label))
|
||||
[] -> withDefaultInfo (S.Break Nothing)
|
||||
rest -> withCategory Error (S.Error rest)
|
||||
toContinue = \case
|
||||
[label] -> withDefaultInfo (S.Continue (Just label))
|
||||
[] -> withDefaultInfo (S.Continue Nothing)
|
||||
rest -> withCategory Error (S.Error rest)
|
||||
|
||||
toStructTy children = do
|
||||
fields <- withRanges range FieldDeclarations children (S.Indexed children)
|
||||
withDefaultInfo (S.Ty fields)
|
||||
|
||||
toLiteral = \case
|
||||
children@[ty, _] -> case category (extract ty) of
|
||||
ArrayTy -> toImplicitArray children
|
||||
DictionaryTy -> toMap children
|
||||
SliceTy -> sliceToSubscriptAccess children
|
||||
_ -> toStruct children
|
||||
rest -> withRanges range Error rest $ S.Error rest
|
||||
toImplicitArray = \case
|
||||
[ty, values] -> withCategory ArrayLiteral (S.Array (Just ty) (toList $ unwrap values))
|
||||
rest -> withRanges range Error rest $ S.Error rest
|
||||
toMap = \case
|
||||
[ty, values] -> withCategory DictionaryLiteral (S.Object (Just ty) (toList $ unwrap values))
|
||||
rest -> withRanges range Error rest $ S.Error rest
|
||||
toStruct = \case
|
||||
[] -> withCategory Struct (S.Struct Nothing [])
|
||||
[ty] -> withCategory Struct (S.Struct (Just ty) [])
|
||||
[ty, values] -> withCategory Struct (S.Struct (Just ty) (toList $ unwrap values))
|
||||
rest -> withRanges range Error rest $ S.Error rest
|
||||
toFieldDecl = \case
|
||||
[idList, ty] -> do
|
||||
ident' <- toIdent (toList $ unwrap idList)
|
||||
case category (extract ty) of
|
||||
StringLiteral -> withCategory FieldDecl (S.FieldDecl ident' Nothing (Just ty))
|
||||
_ -> withCategory FieldDecl (S.FieldDecl ident' (Just ty) Nothing)
|
||||
[idList] -> do
|
||||
ident' <- toIdent (toList $ unwrap idList)
|
||||
withCategory FieldDecl (S.FieldDecl ident' Nothing Nothing)
|
||||
[idList, ty, tag] -> do
|
||||
ident' <- toIdent (toList $ unwrap idList)
|
||||
withCategory FieldDecl (S.FieldDecl ident' (Just ty) (Just tag))
|
||||
rest -> withRanges range Error rest (S.Error rest)
|
||||
|
||||
where
|
||||
toIdent = \case
|
||||
[ident] -> pure ident
|
||||
rest -> withRanges range Error rest (S.Error rest)
|
||||
|
||||
|
||||
toExpression f = \case
|
||||
[expr] -> f expr
|
||||
rest -> S.Error rest
|
||||
@ -88,57 +204,51 @@ termConstructor source sourceSpan name range children _ = case name of
|
||||
rest -> S.Error rest
|
||||
sliceToSubscriptAccess = \case
|
||||
a : rest -> do
|
||||
slice <- withRanges range Slice rest $ S.Fixed rest
|
||||
withDefaultInfo $ S.SubscriptAccess a slice
|
||||
rest -> withDefaultInfo $ S.Error rest
|
||||
sliceElement <- withRanges range Element rest $ S.Fixed rest
|
||||
withCategory Slice (S.SubscriptAccess a sliceElement)
|
||||
rest -> withRanges range Error rest $ S.Error rest
|
||||
|
||||
toIfStatement children = case Prologue.break ((Other "block" ==) . category . extract) children of
|
||||
(clauses, blocks) -> do
|
||||
clauses' <- withRanges range ExpressionStatements clauses (S.Indexed clauses)
|
||||
let blocks' = foldMap (toList . unwrap) blocks
|
||||
withDefaultInfo (S.If clauses' blocks')
|
||||
|
||||
toTypeDecls types = withDefaultInfo $ S.Indexed types
|
||||
|
||||
toTypeDecl = \case
|
||||
[identifier, ty] -> withDefaultInfo $ S.TypeDecl identifier ty
|
||||
rest -> withRanges range Error rest $ S.Error rest
|
||||
|
||||
toIfStatement = \case
|
||||
[clause, block] ->
|
||||
withDefaultInfo $ S.If clause (toList $ unwrap block)
|
||||
[expr, block, elseBlock] | category (extract block) == Other "block" ->
|
||||
withDefaultInfo $ S.If expr (toList (unwrap block) <> toList (unwrap elseBlock))
|
||||
[expr, clause, block] -> do
|
||||
clause' <- withRanges range If [expr, clause] (S.Indexed [expr, clause])
|
||||
withDefaultInfo $ S.If clause' (toList $ unwrap block)
|
||||
rest -> withCategory Error (S.Error rest)
|
||||
toImports imports = do
|
||||
imports' <- mapM toImport imports
|
||||
withDefaultInfo $ S.Indexed (mconcat imports')
|
||||
where
|
||||
toImport i = case toList (unwrap i) of
|
||||
[importName] -> sequenceA [ withCategory Import (S.Import importName []) ]
|
||||
xs@(_:_) -> sequenceA [ withCategory Error (S.Error xs)]
|
||||
rest@(_:_) -> sequenceA [ withRanges range Error rest (S.Error rest)]
|
||||
[] -> pure []
|
||||
|
||||
toVarDecl varSpec = listToVarDecls (toList $ unwrap varSpec)
|
||||
toVarDecls children = withDefaultInfo (S.Indexed children)
|
||||
|
||||
listToVarDecls list = case list of
|
||||
[idList, exprs] | category (extract exprs) == Other "expression_list" -> do
|
||||
assignments' <- sequenceA $ zipWith (\id expr -> withDefaultInfo $ S.VarAssignment id expr) (toList $ unwrap idList) (toList $ unwrap exprs)
|
||||
withDefaultInfo (S.Indexed assignments')
|
||||
[idList, _, exprs] -> do
|
||||
assignments' <- sequenceA $ zipWith (\id expr -> withDefaultInfo $ S.VarAssignment id expr) (toList $ unwrap idList) (toList $ unwrap exprs)
|
||||
withDefaultInfo (S.Indexed assignments')
|
||||
idList : _ -> do
|
||||
varDecls <- mapM (withDefaultInfo . S.VarDecl) (toList $ unwrap idList)
|
||||
withDefaultInfo (S.Indexed varDecls)
|
||||
_ -> withCategory Error (S.Error list)
|
||||
toConsts constSpecs = withDefaultInfo (S.Indexed constSpecs)
|
||||
|
||||
toConsts constSpecs = do
|
||||
assignments' <- sequenceA $ toVarAssignment <$> constSpecs
|
||||
withDefaultInfo (S.Indexed assignments')
|
||||
toVarAssignment constSpec =
|
||||
case toList (unwrap constSpec) of
|
||||
[idList, expressionList] -> do
|
||||
assignments' <- sequenceA $ zipWith (\id expr -> withDefaultInfo $ S.VarAssignment id expr) (toList $ unwrap idList) (toList $ unwrap expressionList)
|
||||
withDefaultInfo (S.Indexed assignments')
|
||||
toVarAssignment = \case
|
||||
[idList, ty] | category (extract ty) == Identifier -> do
|
||||
let ids = toList (unwrap idList)
|
||||
idList' <- mapM (\id -> withRanges range VarDecl [id] (S.VarDecl id (Just ty))) ids
|
||||
withRanges range ExpressionStatements idList' (S.Indexed idList')
|
||||
[idList, expressionList] | category (extract expressionList) == Other "expression_list" -> do
|
||||
assignments' <- sequenceA $ zipWith (\id expr ->
|
||||
withCategory VarAssignment $ S.VarAssignment id expr)
|
||||
(toList $ unwrap idList) (toList $ unwrap expressionList)
|
||||
withRanges range ExpressionStatements assignments' (S.Indexed assignments')
|
||||
[idList, _, expressionList] -> do
|
||||
assignments' <- sequenceA $ zipWith (\id expr -> withDefaultInfo $ S.VarAssignment id expr) (toList $ unwrap idList) (toList $ unwrap expressionList)
|
||||
withDefaultInfo (S.Indexed assignments')
|
||||
[idList] -> do
|
||||
varDecls <- mapM (withDefaultInfo . S.VarDecl) (toList $ unwrap idList)
|
||||
withDefaultInfo (S.Indexed varDecls)
|
||||
rest -> withCategory Error (S.Error rest)
|
||||
assignments' <- sequenceA $ zipWith (\id expr ->
|
||||
withCategory VarAssignment $ S.VarAssignment id expr) (toList $ unwrap idList) (toList $ unwrap expressionList)
|
||||
withRanges range ExpressionStatements assignments' (S.Indexed assignments')
|
||||
[idList] -> withDefaultInfo (S.Indexed [idList])
|
||||
rest -> withRanges range Error rest (S.Error rest)
|
||||
|
||||
withRanges originalRange category' terms syntax =
|
||||
let ranges' = getField . extract <$> terms
|
||||
@ -155,6 +265,7 @@ categoryForGoName :: Text -> Category
|
||||
categoryForGoName = \case
|
||||
"identifier" -> Identifier
|
||||
"int_literal" -> NumberLiteral
|
||||
"float_literal" -> FloatLiteral
|
||||
"comment" -> Comment
|
||||
"return_statement" -> Return
|
||||
"interpreted_string_literal" -> StringLiteral
|
||||
@ -164,19 +275,17 @@ categoryForGoName = \case
|
||||
"func_literal" -> AnonymousFunction
|
||||
"call_expression" -> FunctionCall
|
||||
"selector_expression" -> SubscriptAccess
|
||||
"index_expression" -> SubscriptAccess
|
||||
"slice_expression" -> SubscriptAccess
|
||||
"index_expression" -> IndexExpression
|
||||
"slice_expression" -> Slice
|
||||
"parameters" -> Args
|
||||
"short_var_declaration" -> VarDecl
|
||||
"var_declaration" -> VarDecl
|
||||
"var_spec" -> VarAssignment
|
||||
"const_spec" -> VarAssignment
|
||||
"assignment_statement" -> Assignment
|
||||
"source_file" -> Module
|
||||
"const_declaration" -> VarDecl
|
||||
"if_statement" -> If
|
||||
"for_statement" -> For
|
||||
"expression_switch_statement" -> Switch
|
||||
"expression_case_clause" -> Case
|
||||
"type_switch_statement" -> Switch
|
||||
"type_case_clause" -> Case
|
||||
"select_statement" -> Select
|
||||
@ -185,4 +294,30 @@ categoryForGoName = \case
|
||||
"go_statement" -> Go
|
||||
"type_assertion_expression" -> TypeAssertion
|
||||
"type_conversion_expression" -> TypeConversion
|
||||
"keyed_element" -> Pair
|
||||
"struct_type" -> StructTy
|
||||
"map_type" -> DictionaryTy
|
||||
"array_type" -> ArrayTy
|
||||
"implicit_length_array_type" -> ArrayTy
|
||||
"parameter_declaration" -> ParameterDecl
|
||||
"expression_case" -> Case
|
||||
"type_spec" -> TypeDecl
|
||||
"type_declaration" -> TypeDecl
|
||||
"field_declaration" -> FieldDecl
|
||||
"pointer_type" -> PointerTy
|
||||
"slice_type" -> SliceTy
|
||||
"element" -> Element
|
||||
"literal_value" -> Literal
|
||||
"channel_type" -> ChannelTy
|
||||
"send_statement" -> Send
|
||||
"unary_expression" -> Operator
|
||||
"ERROR" -> Error
|
||||
"function_type" -> FunctionTy
|
||||
"inc_statement" -> IncrementStatement
|
||||
"dec_statement" -> DecrementStatement
|
||||
"qualified_identifier" -> QualifiedIdentifier
|
||||
"break_statement" -> Break
|
||||
"continue_statement" -> Continue
|
||||
"rune_literal" -> RuneLiteral
|
||||
"method_declaration" -> Method
|
||||
s -> Other (toS s)
|
||||
|
@ -58,11 +58,11 @@ termConstructor source sourceSpan name range children allChildren
|
||||
("var_assignment", _ ) -> S.Error children
|
||||
("var_declaration", _) -> S.Indexed $ toVarDecl <$> children
|
||||
("trailing_var_declaration", _) -> S.Indexed $ toVarDecl <$> children
|
||||
("switch_statement", expr : rest) -> S.Switch expr rest
|
||||
("switch_statement", expr : rest) -> S.Switch (Just expr) rest
|
||||
("switch_statement", _ ) -> S.Error children
|
||||
("case", [ expr, body ]) -> S.Case expr [body]
|
||||
("case", _ ) -> S.Error children
|
||||
("object", _) -> S.Object $ foldMap toTuple children
|
||||
("object", _) -> S.Object Nothing $ foldMap toTuple children
|
||||
("pair", _) -> S.Fixed children
|
||||
("comment", _) -> S.Comment . toText $ slice range source
|
||||
("if_statement", expr : rest ) -> S.If expr rest
|
||||
@ -91,9 +91,9 @@ termConstructor source sourceSpan name range children allChildren
|
||||
| Catch <- category (extract catch)
|
||||
, Finally <- category (extract finally) -> S.Try [body] [catch] Nothing (Just finally)
|
||||
_ -> S.Error children
|
||||
("array", _) -> S.Array children
|
||||
("method_definition", [ identifier, params, exprs ]) -> S.Method identifier (toList (unwrap params)) (toList (unwrap exprs))
|
||||
("method_definition", [ identifier, exprs ]) -> S.Method identifier [] (toList (unwrap exprs))
|
||||
("array", _) -> S.Array Nothing children
|
||||
("method_definition", [ identifier, params, exprs ]) -> S.Method identifier Nothing (toList (unwrap params)) (toList (unwrap exprs))
|
||||
("method_definition", [ identifier, exprs ]) -> S.Method identifier Nothing [] (toList (unwrap exprs))
|
||||
("method_definition", _ ) -> S.Error children
|
||||
("class", [ identifier, superclass, definitions ]) -> S.Class identifier (Just superclass) (toList (unwrap definitions))
|
||||
("class", [ identifier, definitions ]) -> S.Class identifier Nothing (toList (unwrap definitions))
|
||||
@ -106,7 +106,7 @@ termConstructor source sourceSpan name range children allChildren
|
||||
S.Indexed _ -> S.Export Nothing (toList (unwrap statements))
|
||||
_ -> S.Export (Just statements) []
|
||||
("export_statement", _ ) -> S.Error children
|
||||
("break_statement", [ expr ] ) -> S.Break expr
|
||||
("break_statement", [ expr ] ) -> S.Break (Just expr)
|
||||
("yield_statement", _ ) -> S.Yield children
|
||||
_ | name `elem` forStatements -> case unsnoc children of
|
||||
Just (exprs, body) -> S.For exprs [body]
|
||||
@ -160,6 +160,7 @@ categoryForJavaScriptProductionName name = case name of
|
||||
"string" -> StringLiteral
|
||||
"integer" -> IntegerLiteral
|
||||
"number" -> NumberLiteral
|
||||
"float" -> FloatLiteral
|
||||
"symbol" -> SymbolLiteral
|
||||
"array" -> ArrayLiteral
|
||||
"function" -> Function
|
||||
|
@ -55,7 +55,7 @@ termConstructor source sourceSpan name range children allChildren
|
||||
-- Let it fall through to generate an Indexed syntax.
|
||||
("optional_parameter", [ k, v ] ) -> S.Pair k v
|
||||
("optional_parameter", _ ) -> S.Error children
|
||||
("array", _ ) -> S.Array children
|
||||
("array", _ ) -> S.Array Nothing children
|
||||
("assignment", [ identifier, value ]) -> S.Assignment identifier value
|
||||
("assignment", _ ) -> S.Error children
|
||||
("begin", _ ) -> case partition (\x -> category (extract x) == Rescue) children of
|
||||
@ -70,7 +70,7 @@ termConstructor source sourceSpan name range children allChildren
|
||||
[ elseBlock ] | Else <- category (extract elseBlock) -> S.Try body rescues (Just elseBlock) Nothing
|
||||
[ ensure ] | Ensure <- category (extract ensure) -> S.Try body rescues Nothing (Just ensure)
|
||||
_ -> S.Try body rescues Nothing Nothing
|
||||
("case", expr : body ) -> S.Switch expr body
|
||||
("case", expr : body ) -> S.Switch (Just expr) body
|
||||
("case", _ ) -> S.Error children
|
||||
("when", condition : body ) -> S.Case condition body
|
||||
("when", _ ) -> S.Error children
|
||||
@ -94,7 +94,7 @@ termConstructor source sourceSpan name range children allChildren
|
||||
[ body ] -> S.AnonymousFunction [] [body]
|
||||
( params : body ) -> S.AnonymousFunction (toList (unwrap params)) body
|
||||
_ -> S.Error children
|
||||
("hash", _ ) -> S.Object $ foldMap toTuple children
|
||||
("hash", _ ) -> S.Object Nothing $ foldMap toTuple children
|
||||
("if_modifier", [ lhs, condition ]) -> S.If condition [lhs]
|
||||
("if_modifier", _ ) -> S.Error children
|
||||
("if", condition : body ) -> S.If condition body
|
||||
@ -110,8 +110,8 @@ termConstructor source sourceSpan name range children allChildren
|
||||
("call", [ base, property ]) -> S.MemberAccess base property
|
||||
("call", _ ) -> S.Error children
|
||||
("method", _ ) -> case children of
|
||||
identifier : params : body | Params <- category (extract params) -> S.Method identifier (toList (unwrap params)) body
|
||||
identifier : body -> S.Method identifier [] body
|
||||
identifier : params : body | Params <- category (extract params) -> S.Method identifier Nothing (toList (unwrap params)) body
|
||||
identifier : body -> S.Method identifier Nothing [] body
|
||||
_ -> S.Error children
|
||||
("module", constant : body ) -> S.Module constant body
|
||||
("module", _ ) -> S.Error children
|
||||
|
@ -5,11 +5,10 @@ module Prologue
|
||||
, (***)
|
||||
, hylo, cata, para, ana
|
||||
, module Data.Hashable
|
||||
, last
|
||||
) where
|
||||
|
||||
import Protolude as X
|
||||
import Data.List (lookup, last)
|
||||
import Data.List (lookup)
|
||||
|
||||
import Control.Comonad.Trans.Cofree as X
|
||||
import Control.Monad.Trans.Free as X
|
||||
|
@ -110,12 +110,12 @@ syntaxToTermField syntax = case syntax of
|
||||
S.MemberAccess identifier value -> [ "identifier" .= identifier ] <> [ "value" .= value ]
|
||||
S.MethodCall identifier methodIdentifier parameters -> [ "identifier" .= identifier ] <> [ "methodIdentifier" .= methodIdentifier ] <> [ "parameters" .= parameters ]
|
||||
S.Operator syntaxes -> [ "operatorSyntaxes" .= syntaxes ]
|
||||
S.VarDecl declaration -> [ "declaration" .= declaration ]
|
||||
S.VarDecl declaration ty -> [ "declaration" .= declaration ] <> [ "type" .= ty]
|
||||
S.VarAssignment identifier value -> [ "identifier" .= identifier ] <> [ "value" .= value ]
|
||||
S.SubscriptAccess identifier property -> [ "identifier" .= identifier ] <> [ "property" .= property ]
|
||||
S.Switch expression cases -> [ "expression" .= expression ] <> [ "cases" .= cases ]
|
||||
S.Case expression statements -> [ "expression" .= expression ] <> [ "statements" .= statements ]
|
||||
S.Object keyValuePairs -> childrenFields keyValuePairs
|
||||
S.Object ty keyValuePairs -> [ "type" .= ty ] <> childrenFields keyValuePairs
|
||||
S.Pair a b -> childrenFields [a, b]
|
||||
S.Comment _ -> []
|
||||
S.Commented comments child -> childrenFields (comments <> maybeToList child)
|
||||
@ -127,9 +127,9 @@ syntaxToTermField syntax = case syntax of
|
||||
S.Throw c -> [ "expression" .= c ]
|
||||
S.Constructor expression -> [ "expression" .= expression ]
|
||||
S.Try body catchExpression elseExpression finallyExpression -> [ "body" .= body ] <> [ "catchExpression" .= catchExpression ] <> [ "elseExpression" .= elseExpression ] <> [ "finallyExpression" .= finallyExpression ]
|
||||
S.Array c -> childrenFields c
|
||||
S.Array ty c -> [ "type" .= ty ] <> childrenFields c
|
||||
S.Class identifier superclass definitions -> [ "identifier" .= identifier ] <> [ "superclass" .= superclass ] <> [ "definitions" .= definitions ]
|
||||
S.Method identifier parameters definitions -> [ "identifier" .= identifier ] <> [ "parameters" .= parameters ] <> [ "definitions" .= definitions ]
|
||||
S.Method identifier ty parameters definitions -> [ "identifier" .= identifier ] <> [ "type" .= ty ] <> [ "parameters" .= parameters ] <> [ "definitions" .= definitions ]
|
||||
S.If expression clauses -> [ "expression" .= expression ] <> childrenFields clauses
|
||||
S.Module identifier definitions-> [ "identifier" .= identifier ] <> [ "definitions" .= definitions ]
|
||||
S.Import identifier statements -> [ "identifier" .= identifier ] <> [ "statements" .= statements ]
|
||||
@ -142,7 +142,14 @@ syntaxToTermField syntax = case syntax of
|
||||
S.Defer cases -> childrenFields cases
|
||||
S.TypeAssertion a b -> childrenFields [a, b]
|
||||
S.TypeConversion a b -> childrenFields [a, b]
|
||||
S.Struct ty fields -> [ "type" .= ty ] <> childrenFields fields
|
||||
S.Break expr -> [ "expression" .= expr ]
|
||||
S.Continue expr -> [ "expression" .= expr ]
|
||||
S.BlockStatement c -> childrenFields c
|
||||
S.ParameterDecl ty field -> [ "type" .= ty ] <> [ "identifier" .= field ]
|
||||
S.DefaultCase c -> childrenFields c
|
||||
S.TypeDecl id ty -> [ "type" .= ty ] <> [ "identifier" .= id ]
|
||||
S.FieldDecl id ty tag -> [ "type" .= ty ] <> [ "identifier" .= id ] <> [ "tag" .= tag]
|
||||
S.Ty ty -> [ "type" .= ty ]
|
||||
S.Send channel expr -> [ "channel" .= channel ] <> [ "expression" .= expr ]
|
||||
where childrenFields c = [ "children" .= c ]
|
||||
|
@ -21,8 +21,8 @@ sExpression _ diff = SExpressionOutput $ printDiff diff 0
|
||||
printDiff :: (HasField fields Category, HasField fields SourceSpan) => Diff (Syntax Text) (Record fields) -> Int -> Text
|
||||
printDiff diff level = case runFree diff of
|
||||
(Pure patch) -> case patch of
|
||||
Insert term -> pad (level - 1) <> "{+" <> printTerm term level <> "}"
|
||||
Delete term -> pad (level - 1) <> "{-" <> printTerm term level <> "}"
|
||||
Insert term -> pad (level - 1) <> "{+" <> printTerm term level <> "+}"
|
||||
Delete term -> pad (level - 1) <> "{-" <> printTerm term level <> "-}"
|
||||
Replace a b -> pad (level - 1) <> "{" <> printTerm a level <> "->" <> printTerm b level <> "}"
|
||||
(Free (Join (_, annotation) :< syntax)) -> pad level <> "(" <> showAnnotation annotation <> foldr (\d acc -> printDiff d (level + 1) <> acc) "" syntax <> ")"
|
||||
where
|
||||
|
@ -43,6 +43,7 @@ styleName category = "category-" <> case category of
|
||||
SymbolLiteral -> "symbol"
|
||||
IntegerLiteral -> "integer"
|
||||
NumberLiteral -> "number"
|
||||
FloatLiteral -> "float"
|
||||
C.Comment -> "comment"
|
||||
C.FunctionCall -> "function_call"
|
||||
C.Function -> "function"
|
||||
@ -112,6 +113,10 @@ styleName category = "category-" <> case category of
|
||||
C.SplatParameter -> "splat_param"
|
||||
C.HashSplatParameter -> "hash_splat_param"
|
||||
C.BlockParameter -> "block_param"
|
||||
C.ArrayTy -> "array_type"
|
||||
C.DictionaryTy -> "dictionary_type"
|
||||
C.StructTy -> "struct_type"
|
||||
C.Struct -> "struct"
|
||||
C.Break -> "break_statement"
|
||||
C.Continue -> "continue_statement"
|
||||
C.Binary -> "binary"
|
||||
@ -123,6 +128,23 @@ styleName category = "category-" <> case category of
|
||||
C.ScopeOperator -> "scope_operator"
|
||||
C.BeginBlock -> "begin_block"
|
||||
C.EndBlock -> "end_block"
|
||||
C.ParameterDecl -> "parameter_declaration"
|
||||
C.DefaultCase -> "default_statement"
|
||||
C.TypeDecl -> "type_declaration"
|
||||
C.PointerTy -> "pointer_type"
|
||||
C.FieldDecl -> "field_declaration"
|
||||
C.SliceTy -> "slice_type"
|
||||
C.Element -> "element"
|
||||
C.Literal -> "literal"
|
||||
C.ChannelTy -> "channel_type"
|
||||
C.FunctionTy -> "function_type"
|
||||
C.Send -> "send_statement"
|
||||
C.IncrementStatement -> "increment_statement"
|
||||
C.DecrementStatement -> "decrement_statement"
|
||||
C.QualifiedIdentifier -> "qualified_identifier"
|
||||
C.IndexExpression -> "index_expression"
|
||||
C.FieldDeclarations -> "field_declarations"
|
||||
C.RuneLiteral -> "rune_literal"
|
||||
|
||||
-- | Pick the class name for a split patch.
|
||||
splitPatchToClassName :: SplitPatch a -> AttributeValue
|
||||
|
@ -103,7 +103,7 @@ sourceSpanToRange source SourceSpan{..} = Range start end
|
||||
rangeToSourceSpan :: Source Char -> Range -> SourceSpan
|
||||
rangeToSourceSpan source range@Range{} = SourceSpan startPos endPos
|
||||
where startPos = maybe (SourcePos 1 1) (toStartPos 1) (head lineRanges)
|
||||
endPos = toEndPos (length lineRanges) (last lineRanges)
|
||||
endPos = toEndPos (length lineRanges) (fromMaybe (rangeAt 0) (snd <$> unsnoc lineRanges))
|
||||
lineRanges = actualLineRanges range source
|
||||
toStartPos line range = SourcePos line (start range)
|
||||
toEndPos line range = SourcePos line (end range)
|
||||
|
@ -39,16 +39,18 @@ data Syntax a f
|
||||
-- | An operator can be applied to a list of syntaxes.
|
||||
| Operator [f]
|
||||
-- | A variable declaration. e.g. var foo;
|
||||
| VarDecl f
|
||||
| VarDecl f (Maybe f)
|
||||
-- | A variable assignment in a variable declaration. var foo = bar;
|
||||
| VarAssignment { varId :: f, varValue :: f }
|
||||
-- | A subscript access contains a syntax, and another syntax that indefies a property or value in the first syntax.
|
||||
-- | e.g. in Javascript x["y"] represents a subscript access syntax.
|
||||
| SubscriptAccess { subscriptId :: f, subscriptElement :: f }
|
||||
| Switch { switchExpr :: f, cases :: [f] }
|
||||
| Switch { switchExpr :: (Maybe f), cases :: [f] }
|
||||
| Case { caseExpr :: f, caseStatements :: [f] }
|
||||
-- | A default case in a switch statement.
|
||||
| DefaultCase [f]
|
||||
| Select { cases :: [f] }
|
||||
| Object { keyValues :: [f] }
|
||||
| Object { objectTy :: Maybe f, keyValues :: [f] }
|
||||
-- | A pair in an Object. e.g. foo: bar or foo => bar
|
||||
| Pair f f
|
||||
-- | A comment.
|
||||
@ -66,11 +68,11 @@ data Syntax a f
|
||||
-- | TODO: Is it a problem that in Ruby, this pattern can work for method def too?
|
||||
| Try { tryBegin :: [f], catchRescue :: [f], beginElse :: Maybe f, finallyEnsure :: Maybe f }
|
||||
-- | An array literal with list of children.
|
||||
| Array [f]
|
||||
| Array (Maybe f) [f]
|
||||
-- | A class with an identifier, superclass, and a list of definitions.
|
||||
| Class f (Maybe f) [f]
|
||||
-- | A method definition with an identifier, params, and a list of expressions.
|
||||
| Method f [f] [f]
|
||||
-- | A method definition with an identifier, optional return type, params, and a list of expressions.
|
||||
| Method f (Maybe f) [f] [f]
|
||||
-- | An if statement with an expression and maybe more expression clauses.
|
||||
| If f [f]
|
||||
-- | A module with an identifier, and a list of syntaxes.
|
||||
@ -86,10 +88,22 @@ data Syntax a f
|
||||
| Defer f
|
||||
| TypeAssertion f f
|
||||
| TypeConversion f f
|
||||
| Break f
|
||||
| Continue f
|
||||
-- | A struct with an optional type.
|
||||
| Struct (Maybe f) [f]
|
||||
| Break (Maybe f)
|
||||
| Continue (Maybe f)
|
||||
-- | A block statement has an ordered branch of child nodes, e.g. BEGIN {...} or END {...} in Ruby/Perl.
|
||||
| BlockStatement [f]
|
||||
-- | A parameter declaration with an optional type.
|
||||
| ParameterDecl (Maybe f) f
|
||||
-- | A type declaration has an identifier and a type.
|
||||
| TypeDecl f f
|
||||
-- | A field declaration with an optional type, and an optional tag.
|
||||
| FieldDecl f (Maybe f) (Maybe f)
|
||||
-- | A type.
|
||||
| Ty f
|
||||
-- | A send statement has a channel and an expression in Go.
|
||||
| Send f f
|
||||
deriving (Eq, Foldable, Functor, Generic, Generic1, Mergeable, Ord, Show, Traversable, ToJSON)
|
||||
|
||||
|
||||
@ -109,13 +123,13 @@ instance Listable2 Syntax where
|
||||
\/ liftCons2 recur recur MemberAccess
|
||||
\/ liftCons3 recur recur (liftTiers recur) MethodCall
|
||||
\/ liftCons1 (liftTiers recur) Operator
|
||||
\/ liftCons1 recur VarDecl
|
||||
\/ liftCons2 recur (liftTiers recur) VarDecl
|
||||
\/ liftCons2 recur recur VarAssignment
|
||||
\/ liftCons2 recur recur SubscriptAccess
|
||||
\/ liftCons2 recur (liftTiers recur) Switch
|
||||
\/ liftCons2 (liftTiers recur) (liftTiers recur) Switch
|
||||
\/ liftCons2 recur (liftTiers recur) Case
|
||||
\/ liftCons1 (liftTiers recur) Select
|
||||
\/ liftCons1 (liftTiers recur) Syntax.Object
|
||||
\/ liftCons2 (liftTiers recur) (liftTiers recur) Syntax.Object
|
||||
\/ liftCons2 recur recur Pair
|
||||
\/ liftCons1 leaf Comment
|
||||
\/ liftCons2 (liftTiers recur) (liftTiers recur) Commented
|
||||
@ -127,9 +141,9 @@ instance Listable2 Syntax where
|
||||
\/ liftCons1 recur Throw
|
||||
\/ liftCons1 recur Constructor
|
||||
\/ liftCons4 (liftTiers recur) (liftTiers recur) (liftTiers recur) (liftTiers recur) Try
|
||||
\/ liftCons1 (liftTiers recur) Syntax.Array
|
||||
\/ liftCons2 (liftTiers recur) (liftTiers recur) Syntax.Array
|
||||
\/ liftCons3 recur (liftTiers recur) (liftTiers recur) Class
|
||||
\/ liftCons3 recur (liftTiers recur) (liftTiers recur) Method
|
||||
\/ liftCons4 recur (liftTiers recur) (liftTiers recur) (liftTiers recur) Method
|
||||
\/ liftCons2 recur (liftTiers recur) If
|
||||
\/ liftCons2 recur (liftTiers recur) Module
|
||||
\/ liftCons2 recur (liftTiers recur) Import
|
||||
@ -141,9 +155,15 @@ instance Listable2 Syntax where
|
||||
\/ liftCons1 recur Defer
|
||||
\/ liftCons2 recur recur TypeAssertion
|
||||
\/ liftCons2 recur recur TypeConversion
|
||||
\/ liftCons1 recur Break
|
||||
\/ liftCons1 recur Continue
|
||||
\/ liftCons1 (liftTiers recur) Break
|
||||
\/ liftCons1 (liftTiers recur) Continue
|
||||
\/ liftCons1 (liftTiers recur) BlockStatement
|
||||
\/ liftCons2 (liftTiers recur) recur ParameterDecl
|
||||
\/ liftCons2 recur recur TypeDecl
|
||||
\/ liftCons3 recur (liftTiers recur) (liftTiers recur) FieldDecl
|
||||
\/ liftCons1 recur Ty
|
||||
\/ liftCons2 recur recur Send
|
||||
\/ liftCons1 (liftTiers recur) DefaultCase
|
||||
|
||||
instance Listable leaf => Listable1 (Syntax leaf) where
|
||||
liftTiers = liftTiers2 tiers
|
||||
|
@ -1,4 +1,46 @@
|
||||
[{
|
||||
"testCaseDescription": "go-array-types-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"array-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"array-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/array-types.go b/array-types.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/array-types.go",
|
||||
"+++ b/array-types.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "95b89b9b110156a8ff35bda066874de1c055bb2c..ae58e611b00e778cdc8a242378790d935889bbc0"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-array-types-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
@ -7,61 +49,16 @@
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
10
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '2'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
11
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
12
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '2'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
14
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'x' identifier"
|
||||
"summary": "Added the 'a' type declaration in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -72,266 +69,19 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/array-types.go b/array-types.go",
|
||||
"index e69de29..f9c11b8 100644",
|
||||
"index 79058077..3f73aea0 100644",
|
||||
"--- a/array-types.go",
|
||||
"+++ b/array-types.go",
|
||||
"@@ -0,0 +1 @@",
|
||||
"+type a [2+2]x"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "4605c9308ffc84f9d63dc5e62562b0461d53d5b9..e72a08882ea7900f125d452420494cdf0f9dd5e4"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-array-types-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"array-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
10
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '1'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
11
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
12
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '1'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
14
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'y' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
10
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '2'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
11
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
12
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '2'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
14
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'x' identifier"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"array-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/array-types.go b/array-types.go",
|
||||
"index f9c11b8..d2b8166 100644",
|
||||
"--- a/array-types.go",
|
||||
"+++ b/array-types.go",
|
||||
"@@ -1 +1,3 @@",
|
||||
"+type a [1+1]y",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+type a [2+2]x",
|
||||
" type a [2+2]x"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "e72a08882ea7900f125d452420494cdf0f9dd5e4..aa6f10e79008f9c024ed3883cec3d84f74157628"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-array-types-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"array-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
10
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
10
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '1' with '2'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
11
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
12
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
11
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
12
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '1' with '2'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
14
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
14
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'y' identifier with the 'x' identifier"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"array-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/array-types.go b/array-types.go",
|
||||
"index d2b8166..823c5f1 100644",
|
||||
"--- a/array-types.go",
|
||||
"+++ b/array-types.go",
|
||||
"@@ -1,3 +1,3 @@",
|
||||
"-type a [1+1]y",
|
||||
"+type a [2+2]x",
|
||||
" type a [2+2]x",
|
||||
" type a [2+2]x"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "aa6f10e79008f9c024ed3883cec3d84f74157628..e89c6cb69bfb749d230d2d02cb2f121098bb9ca7"
|
||||
"shas": "ae58e611b00e778cdc8a242378790d935889bbc0..c813e84861bc89f360c0fa64743061968ba5686c"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-array-types-replacement-test",
|
||||
@ -343,81 +93,81 @@
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
10
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
10
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '2' with '1'"
|
||||
"summary": "Replaced '2' with '1' in the 'a' type declaration of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
11
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
12
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
11
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
12
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '2' with '1'"
|
||||
"summary": "Replaced '2' with '1' in the 'a' type declaration of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
14
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
14
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'x' identifier with the 'y' identifier"
|
||||
"summary": "Replaced the 'x' identifier with the 'y' identifier in the 'a' type declaration of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -428,17 +178,19 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/array-types.go b/array-types.go",
|
||||
"index 823c5f1..d2b8166 100644",
|
||||
"index 3f73aea0..49783126 100644",
|
||||
"--- a/array-types.go",
|
||||
"+++ b/array-types.go",
|
||||
"@@ -1,3 +1,3 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-type a [2+2]x",
|
||||
"+type a [1+1]y",
|
||||
" type a [2+2]x",
|
||||
" type a [2+2]x"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "e89c6cb69bfb749d230d2d02cb2f121098bb9ca7..cb40195715b97fd727f39a658f90da91280dfeb3"
|
||||
"shas": "c813e84861bc89f360c0fa64743061968ba5686c..c2f4e78ca2195544a4e0c0d572c9aa9b13828975"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-array-types-delete-replacement-test",
|
||||
@ -447,183 +199,84 @@
|
||||
"array-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
7
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
10
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
10
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'a' identifier"
|
||||
"summary": "Replaced '1' with '2' in the 'a' type declaration of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
10
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
11
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
12
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
11
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
12
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted '1'"
|
||||
"summary": "Replaced '1' with '2' in the 'a' type declaration of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
11
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
12
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
14
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
14
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted '1'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
14
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'y' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
10
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '2'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
11
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
12
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '2'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
14
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'x' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
10
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '1'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
11
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
12
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '1'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
14
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'y' identifier"
|
||||
"summary": "Replaced the 'y' identifier with the 'x' identifier in the 'a' type declaration of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -634,20 +287,22 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/array-types.go b/array-types.go",
|
||||
"index d2b8166..5b93d14 100644",
|
||||
"index 49783126..3f73aea0 100644",
|
||||
"--- a/array-types.go",
|
||||
"+++ b/array-types.go",
|
||||
"@@ -1,3 +1,2 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-type a [1+1]y",
|
||||
"-type a [2+2]x",
|
||||
" type a [2+2]x",
|
||||
"+type a [1+1]y"
|
||||
"+type a [2+2]x",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "cb40195715b97fd727f39a658f90da91280dfeb3..9629b178034aa4530628081bc407e1c9009fe13d"
|
||||
"shas": "c2f4e78ca2195544a4e0c0d572c9aa9b13828975..133740a949b9891053624b8a9d519e2244e6d2ac"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-array-types-delete-test",
|
||||
"testCaseDescription": "go-array-types-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"array-types.go": [
|
||||
@ -655,61 +310,16 @@
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
10
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '2'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
11
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
12
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '2'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
14
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'x' identifier"
|
||||
"summary": "Deleted the 'a' type declaration in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -720,18 +330,22 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/array-types.go b/array-types.go",
|
||||
"index 5b93d14..967447e 100644",
|
||||
"index 3f73aea0..79058077 100644",
|
||||
"--- a/array-types.go",
|
||||
"+++ b/array-types.go",
|
||||
"@@ -1,2 +1 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-type a [2+2]x",
|
||||
" type a [1+1]y"
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "9629b178034aa4530628081bc407e1c9009fe13d..d9b4ebb8d64c12b8efbc1fbdcc2c31bf584a17c2"
|
||||
"shas": "133740a949b9891053624b8a9d519e2244e6d2ac..cc78ad7555ca4ccf1239b7be96f8219bd37aed0f"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-array-types-delete-rest-test",
|
||||
"testCaseDescription": "go-array-types-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"array-types.go": [
|
||||
@ -740,60 +354,15 @@
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
6
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
7
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
10
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '1'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
11
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
12
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '1'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
14
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'y' identifier"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -804,12 +373,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/array-types.go b/array-types.go",
|
||||
"index 967447e..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/array-types.go",
|
||||
"+++ b/array-types.go",
|
||||
"@@ -1 +0,0 @@",
|
||||
"-type a [1+1]y"
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "d9b4ebb8d64c12b8efbc1fbdcc2c31bf584a17c2..ecbb5b13e89407c4e715ccf67e358e5fc18fbfe6"
|
||||
"shas": "cc78ad7555ca4ccf1239b7be96f8219bd37aed0f..311f299ee4b5dcd8c757aaf89a1230d369bda6e3"
|
||||
}]
|
||||
|
@ -1,4 +1,46 @@
|
||||
[{
|
||||
"testCaseDescription": "go-array-with-implicit-length-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"array-with-implicit-length.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"array-with-implicit-length.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/array-with-implicit-length.go",
|
||||
"+++ b/array-with-implicit-length.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "99d38d0dd43a990f37c709b49fa2eae7137a4acc..211a36fc067131cefd434c813f3d075171d40847"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-array-with-implicit-length-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
@ -7,16 +49,16 @@
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
4,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
29
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a1' variable"
|
||||
"summary": "Added the 'a1' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -27,268 +69,111 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
|
||||
"index e69de29..96bef76 100644",
|
||||
"index 79058077..a53dc8c5 100644",
|
||||
"--- a/array-with-implicit-length.go",
|
||||
"+++ b/array-with-implicit-length.go",
|
||||
"@@ -0,0 +1 @@",
|
||||
"+const a1 = [...]int{1, 2, 3}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "0fff314fad0973ea89120a1ae3b7940e0f7866d2..d047fe40a9c741f62abe5a1313da6f36caca7979"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-array-with-implicit-length-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"array-with-implicit-length.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
27
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a1' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
29
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a1' variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"array-with-implicit-length.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
|
||||
"index 96bef76..f49bee5 100644",
|
||||
"--- a/array-with-implicit-length.go",
|
||||
"+++ b/array-with-implicit-length.go",
|
||||
"@@ -1 +1,3 @@",
|
||||
"+const a1 = [...]int{4,5,6}",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+const a1 = [...]int{1, 2, 3}",
|
||||
" const a1 = [...]int{1, 2, 3}"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "d047fe40a9c741f62abe5a1313da6f36caca7979..2fcb5b095ac3ea0981a515c3dd0f52c9212611d5"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-array-with-implicit-length-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"array-with-implicit-length.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
21
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
22
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
21
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
22
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '4' with '1' in the a1 variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
24
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
25
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '2' in the a1 variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
23
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
24
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
27
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
28
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '5' with '3' in the a1 variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
25
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
26
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '6' in the a1 variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"array-with-implicit-length.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
|
||||
"index f49bee5..9dcd627 100644",
|
||||
"--- a/array-with-implicit-length.go",
|
||||
"+++ b/array-with-implicit-length.go",
|
||||
"@@ -1,3 +1,3 @@",
|
||||
"-const a1 = [...]int{4,5,6}",
|
||||
"+const a1 = [...]int{1, 2, 3}",
|
||||
" const a1 = [...]int{1, 2, 3}",
|
||||
" const a1 = [...]int{1, 2, 3}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "2fcb5b095ac3ea0981a515c3dd0f52c9212611d5..f07306969d190ef934d9e77f78c1af6e6aeb0d63"
|
||||
"shas": "211a36fc067131cefd434c813f3d075171d40847..00142c98da414f4b9b004938c766a865ef9ca9cc"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-array-with-implicit-length-replacement-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"array-with-implicit-length.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
4,
|
||||
21
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
22
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '4' in the [...]int array of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
21
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
22
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
21
|
||||
4,
|
||||
23
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
22
|
||||
4,
|
||||
24
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '1' with '4' in the a1 variable"
|
||||
"summary": "Replaced '1' with '5' in the [...]int array of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
23
|
||||
4,
|
||||
25
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
24
|
||||
4,
|
||||
26
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '5' in the a1 variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
24
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
25
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
25
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
26
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '2' with '6' in the a1 variable"
|
||||
"summary": "Added '6' in the [...]int array of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
24
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
25
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '2' in the [...]int array of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
27
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
28
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '3' in the a1 variable"
|
||||
"summary": "Deleted '3' in the [...]int array of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -299,17 +184,19 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
|
||||
"index 9dcd627..f49bee5 100644",
|
||||
"index a53dc8c5..e9e3d08f 100644",
|
||||
"--- a/array-with-implicit-length.go",
|
||||
"+++ b/array-with-implicit-length.go",
|
||||
"@@ -1,3 +1,3 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-const a1 = [...]int{1, 2, 3}",
|
||||
"+const a1 = [...]int{4,5,6}",
|
||||
" const a1 = [...]int{1, 2, 3}",
|
||||
" const a1 = [...]int{1, 2, 3}"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "f07306969d190ef934d9e77f78c1af6e6aeb0d63..c40f719c69cda9a21d80cdc1f985fd913875eb7e"
|
||||
"shas": "00142c98da414f4b9b004938c766a865ef9ca9cc..3118925a075454560fa69ce5ebfacc1ab4a1fc22"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-array-with-implicit-length-delete-replacement-test",
|
||||
@ -318,48 +205,93 @@
|
||||
"array-with-implicit-length.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
4,
|
||||
21
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
27
|
||||
4,
|
||||
22
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a1' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
29
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a1' variable"
|
||||
"summary": "Added '1' in the [...]int array of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
4,
|
||||
24
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
27
|
||||
4,
|
||||
25
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a1' variable"
|
||||
"summary": "Added '2' in the [...]int array of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
4,
|
||||
27
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
28
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '3' in the [...]int array of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
21
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
22
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '4' in the [...]int array of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
23
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
24
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '5' in the [...]int array of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
25
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
26
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '6' in the [...]int array of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -370,20 +302,22 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
|
||||
"index f49bee5..47b9eed 100644",
|
||||
"index e9e3d08f..a53dc8c5 100644",
|
||||
"--- a/array-with-implicit-length.go",
|
||||
"+++ b/array-with-implicit-length.go",
|
||||
"@@ -1,3 +1,2 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-const a1 = [...]int{4,5,6}",
|
||||
"-const a1 = [...]int{1, 2, 3}",
|
||||
" const a1 = [...]int{1, 2, 3}",
|
||||
"+const a1 = [...]int{4,5,6}"
|
||||
"+const a1 = [...]int{1, 2, 3}",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "c40f719c69cda9a21d80cdc1f985fd913875eb7e..6871f75087736569e032a112eaec06d72af2c580"
|
||||
"shas": "3118925a075454560fa69ce5ebfacc1ab4a1fc22..ede962753105dbc124a103ff601756358a811053"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-array-with-implicit-length-delete-test",
|
||||
"testCaseDescription": "go-array-with-implicit-length-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"array-with-implicit-length.go": [
|
||||
@ -391,16 +325,16 @@
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
4,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
29
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a1' variable"
|
||||
"summary": "Deleted the 'a1' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -411,18 +345,22 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
|
||||
"index 47b9eed..4a8295f 100644",
|
||||
"index a53dc8c5..79058077 100644",
|
||||
"--- a/array-with-implicit-length.go",
|
||||
"+++ b/array-with-implicit-length.go",
|
||||
"@@ -1,2 +1 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-const a1 = [...]int{1, 2, 3}",
|
||||
" const a1 = [...]int{4,5,6}"
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "6871f75087736569e032a112eaec06d72af2c580..c4b7115fd6f988b0de691ac1ef1a25066093bfb3"
|
||||
"shas": "ede962753105dbc124a103ff601756358a811053..12750762f7c4a8ec1281438c128961c29ff33b44"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-array-with-implicit-length-delete-rest-test",
|
||||
"testCaseDescription": "go-array-with-implicit-length-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"array-with-implicit-length.go": [
|
||||
@ -434,12 +372,12 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
27
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a1' variable"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -450,12 +388,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
|
||||
"index 4a8295f..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/array-with-implicit-length.go",
|
||||
"+++ b/array-with-implicit-length.go",
|
||||
"@@ -1 +0,0 @@",
|
||||
"-const a1 = [...]int{4,5,6}"
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "c4b7115fd6f988b0de691ac1ef1a25066093bfb3..f366494a187af73e7fcf6d60c2aa3bb503543f80"
|
||||
"shas": "12750762f7c4a8ec1281438c128961c29ff33b44..64841687a4cbcda7d1eda64e527648f5cef1bf73"
|
||||
}]
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,124 +1,50 @@
|
||||
[{
|
||||
"testCaseDescription": "go-call-expressions-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"call-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"call-expressions.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/call-expressions.go b/call-expressions.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/call-expressions.go",
|
||||
"+++ b/call-expressions.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "20ca91d3f69487f7d530b334333fdfe2a3743e03..f28c3d5ee5b66191bb89061bd551b60a74ac7c7c"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-call-expressions-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {},
|
||||
"errors": {
|
||||
"changes": {
|
||||
"call-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'x(b, c...)' at line 1, column 1 - line 1, column 11"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'y(b, c,)' at line 2, column 1 - line 2, column 9"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'z(b,c...,)' at line 3, column 1 - line 3, column 11"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"filePaths": [
|
||||
"call-expressions.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/call-expressions.go b/call-expressions.go",
|
||||
"index e69de29..ecd7132 100644",
|
||||
"--- a/call-expressions.go",
|
||||
"+++ b/call-expressions.go",
|
||||
"@@ -0,0 +1,3 @@",
|
||||
"+x(b, c...)",
|
||||
"+y(b, c,)",
|
||||
"+z(b,c...,)"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "b47f159a4e69c481019748b1b4451ca5480b48ac..c8763d16606cda825fb974369f9a2b519439e29e"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-call-expressions-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {},
|
||||
"errors": {
|
||||
"call-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a(b, c...)' at line 1, column 1 - line 1, column 11"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b(b, c,)' at line 2, column 1 - line 2, column 9"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'c(b,c...,)' at line 3, column 1 - line 3, column 11"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
@ -132,7 +58,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'x(b, c...)' at line 4, column 1 - line 4, column 11"
|
||||
"summary": "Added the 'x(b, c)' function call in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
@ -147,7 +73,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'y(b, c,)' at line 5, column 1 - line 5, column 9"
|
||||
"summary": "Added the 'y(b, c)' function call in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
@ -162,371 +88,160 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'z(b,c...,)' at line 6, column 1 - line 6, column 11"
|
||||
"summary": "Added the 'z(b, c)' function call in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"call-expressions.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/call-expressions.go b/call-expressions.go",
|
||||
"index ecd7132..d979c0a 100644",
|
||||
"index 79058077..72918e59 100644",
|
||||
"--- a/call-expressions.go",
|
||||
"+++ b/call-expressions.go",
|
||||
"@@ -1,3 +1,9 @@",
|
||||
"+a(b, c...)",
|
||||
"+b(b, c,)",
|
||||
"+c(b,c...,)",
|
||||
"@@ -1,5 +1,7 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+x(b, c...)",
|
||||
"+y(b, c,)",
|
||||
"+z(b,c...,)",
|
||||
" x(b, c...)",
|
||||
" y(b, c,)",
|
||||
" z(b,c...,)"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "c8763d16606cda825fb974369f9a2b519439e29e..efeb7a0f095a0f9412a310203ec9147cc43a093a"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-call-expressions-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {},
|
||||
"errors": {
|
||||
"call-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'x(b, c...)' at line 1, column 1 - line 1, column 11"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'y(b, c,)' at line 2, column 1 - line 2, column 9"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'z(b,c...,)' at line 3, column 1 - line 3, column 11"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a(b, c...)' at line 1, column 1 - line 1, column 11"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b(b, c,)' at line 2, column 1 - line 2, column 9"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'c(b,c...,)' at line 3, column 1 - line 3, column 11"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"filePaths": [
|
||||
"call-expressions.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/call-expressions.go b/call-expressions.go",
|
||||
"index d979c0a..a3950ff 100644",
|
||||
"--- a/call-expressions.go",
|
||||
"+++ b/call-expressions.go",
|
||||
"@@ -1,6 +1,6 @@",
|
||||
"-a(b, c...)",
|
||||
"-b(b, c,)",
|
||||
"-c(b,c...,)",
|
||||
"+x(b, c...)",
|
||||
"+y(b, c,)",
|
||||
"+z(b,c...,)",
|
||||
" x(b, c...)",
|
||||
" y(b, c,)",
|
||||
" z(b,c...,)"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "efeb7a0f095a0f9412a310203ec9147cc43a093a..9c07ff15f6bdc008d045bbaebae934200a2a6734"
|
||||
"shas": "f28c3d5ee5b66191bb89061bd551b60a74ac7c7c..4bf42888f808e158884d8ba275440c1044ac7d9c"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-call-expressions-replacement-test",
|
||||
"expectedResult": {
|
||||
"changes": {},
|
||||
"errors": {
|
||||
"changes": {
|
||||
"call-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a(b, c...)' at line 1, column 1 - line 1, column 11"
|
||||
"summary": "Added the 'a(b, c)' function call in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b(b, c,)' at line 2, column 1 - line 2, column 9"
|
||||
"summary": "Added the 'b(b, c)' function call in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
6,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'c(b,c...,)' at line 3, column 1 - line 3, column 11"
|
||||
"summary": "Added the 'c(b, c)' function call in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'x(b, c...)' at line 1, column 1 - line 1, column 11"
|
||||
"summary": "Deleted the 'x(b, c)' function call in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'y(b, c,)' at line 2, column 1 - line 2, column 9"
|
||||
"summary": "Deleted the 'y(b, c)' function call in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
6,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'z(b,c...,)' at line 3, column 1 - line 3, column 11"
|
||||
"summary": "Deleted the 'z(b, c)' function call in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"call-expressions.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/call-expressions.go b/call-expressions.go",
|
||||
"index a3950ff..d979c0a 100644",
|
||||
"index 72918e59..2d5e765c 100644",
|
||||
"--- a/call-expressions.go",
|
||||
"+++ b/call-expressions.go",
|
||||
"@@ -1,6 +1,6 @@",
|
||||
"@@ -1,7 +1,7 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-x(b, c...)",
|
||||
"-y(b, c,)",
|
||||
"-z(b,c...,)",
|
||||
"+a(b, c...)",
|
||||
"+b(b, c,)",
|
||||
"+c(b,c...,)",
|
||||
" x(b, c...)",
|
||||
" y(b, c,)",
|
||||
" z(b,c...,)"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "9c07ff15f6bdc008d045bbaebae934200a2a6734..a1710da50116f9380b25e096b698eec1b03325f6"
|
||||
"shas": "4bf42888f808e158884d8ba275440c1044ac7d9c..65d3fd0c110b229fa26172815f243a53541e4f0b"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-call-expressions-delete-replacement-test",
|
||||
"expectedResult": {
|
||||
"changes": {},
|
||||
"errors": {
|
||||
"changes": {
|
||||
"call-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a(b, c...)' at line 1, column 1 - line 1, column 11"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b(b, c,)' at line 2, column 1 - line 2, column 9"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'c(b,c...,)' at line 3, column 1 - line 3, column 11"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'x(b, c...)' at line 4, column 1 - line 4, column 11"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'y(b, c,)' at line 5, column 1 - line 5, column 9"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'z(b,c...,)' at line 6, column 1 - line 6, column 11"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
@ -540,7 +255,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a(b, c...)' at line 4, column 1 - line 4, column 11"
|
||||
"summary": "Added the 'x(b, c)' function call in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
@ -555,7 +270,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b(b, c,)' at line 5, column 1 - line 5, column 9"
|
||||
"summary": "Added the 'y(b, c)' function call in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
@ -570,41 +285,159 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'c(b,c...,)' at line 6, column 1 - line 6, column 11"
|
||||
"summary": "Added the 'z(b, c)' function call in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a(b, c)' function call in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b(b, c)' function call in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'c(b, c)' function call in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"call-expressions.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/call-expressions.go b/call-expressions.go",
|
||||
"index d979c0a..589914d 100644",
|
||||
"index 2d5e765c..72918e59 100644",
|
||||
"--- a/call-expressions.go",
|
||||
"+++ b/call-expressions.go",
|
||||
"@@ -1,9 +1,6 @@",
|
||||
"@@ -1,7 +1,7 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-a(b, c...)",
|
||||
"-b(b, c,)",
|
||||
"-c(b,c...,)",
|
||||
"+x(b, c...)",
|
||||
"+y(b, c,)",
|
||||
"+z(b,c...,)",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "65d3fd0c110b229fa26172815f243a53541e4f0b..6bf993afa56c99144a874460c89325303fc54b21"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-call-expressions-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"call-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'x(b, c)' function call in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'y(b, c)' function call in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'z(b, c)' function call in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"call-expressions.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/call-expressions.go b/call-expressions.go",
|
||||
"index 72918e59..79058077 100644",
|
||||
"--- a/call-expressions.go",
|
||||
"+++ b/call-expressions.go",
|
||||
"@@ -1,7 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-x(b, c...)",
|
||||
"-y(b, c,)",
|
||||
"-z(b,c...,)",
|
||||
" x(b, c...)",
|
||||
" y(b, c,)",
|
||||
" z(b,c...,)",
|
||||
"+a(b, c...)",
|
||||
"+b(b, c,)",
|
||||
"+c(b,c...,)"
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "a1710da50116f9380b25e096b698eec1b03325f6..a1c6a59603e72f43ab5a830e99818da54d6fb95b"
|
||||
"shas": "6bf993afa56c99144a874460c89325303fc54b21..88b0afbe7ddf59f5ced55be27ce159f7899afd6b"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-call-expressions-delete-test",
|
||||
"testCaseDescription": "go-call-expressions-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {},
|
||||
"errors": {
|
||||
"changes": {
|
||||
"call-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
@ -614,132 +447,32 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'x(b, c...)' at line 1, column 1 - line 1, column 11"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'y(b, c,)' at line 2, column 1 - line 2, column 9"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'z(b,c...,)' at line 3, column 1 - line 3, column 11"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"call-expressions.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/call-expressions.go b/call-expressions.go",
|
||||
"index 589914d..1dc566c 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/call-expressions.go",
|
||||
"+++ b/call-expressions.go",
|
||||
"@@ -1,6 +1,3 @@",
|
||||
"-x(b, c...)",
|
||||
"-y(b, c,)",
|
||||
"-z(b,c...,)",
|
||||
" a(b, c...)",
|
||||
" b(b, c,)",
|
||||
" c(b,c...,)"
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "a1c6a59603e72f43ab5a830e99818da54d6fb95b..9293baf00488ad7785e23a8b78ab5f95342ebab3"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-call-expressions-delete-rest-test",
|
||||
"expectedResult": {
|
||||
"changes": {},
|
||||
"errors": {
|
||||
"call-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a(b, c...)' at line 1, column 1 - line 1, column 11"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b(b, c,)' at line 2, column 1 - line 2, column 9"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'c(b,c...,)' at line 3, column 1 - line 3, column 11"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"filePaths": [
|
||||
"call-expressions.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/call-expressions.go b/call-expressions.go",
|
||||
"index 1dc566c..e69de29 100644",
|
||||
"--- a/call-expressions.go",
|
||||
"+++ b/call-expressions.go",
|
||||
"@@ -1,3 +0,0 @@",
|
||||
"-a(b, c...)",
|
||||
"-b(b, c,)",
|
||||
"-c(b,c...,)"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "9293baf00488ad7785e23a8b78ab5f95342ebab3..8cef11ced56e7aed74af10acde19377ccfe0b6af"
|
||||
"shas": "88b0afbe7ddf59f5ced55be27ce159f7899afd6b..ef42f9e80388d7180896d3d04b0140b1760b8cde"
|
||||
}]
|
||||
|
256
test/corpus/diff-summaries/go/case-statements.json
Normal file
256
test/corpus/diff-summaries/go/case-statements.json
Normal file
@ -0,0 +1,256 @@
|
||||
[{
|
||||
"testCaseDescription": "go-case-statements-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"case-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"case-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/case-statements.go b/case-statements.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/case-statements.go",
|
||||
"+++ b/case-statements.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "ef1ac04aeb5238b9f803a01487634a5dbb904dd2..e1760700810736700d364d42190327f8c9096457"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-case-statements-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"case-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added a switch statement in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"case-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/case-statements.go b/case-statements.go",
|
||||
"index 79058077..0b4c9561 100644",
|
||||
"--- a/case-statements.go",
|
||||
"+++ b/case-statements.go",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+switch { }",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "e1760700810736700d364d42190327f8c9096457..9b44a85844e0ef23b3b09c30db1cec12d678af5d"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-case-statements-replacement-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"case-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
26
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'foo' case statement in a switch statement of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"case-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/case-statements.go b/case-statements.go",
|
||||
"index 0b4c9561..27b70908 100644",
|
||||
"--- a/case-statements.go",
|
||||
"+++ b/case-statements.go",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-switch { }",
|
||||
"+switch { case foo: f1() }",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "9b44a85844e0ef23b3b09c30db1cec12d678af5d..31744aa062708c7173fda2a34a2540e25abd163c"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-case-statements-delete-replacement-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"case-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
26
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'foo' case statement in a switch statement of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"case-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/case-statements.go b/case-statements.go",
|
||||
"index 27b70908..0b4c9561 100644",
|
||||
"--- a/case-statements.go",
|
||||
"+++ b/case-statements.go",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-switch { case foo: f1() }",
|
||||
"+switch { }",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "31744aa062708c7173fda2a34a2540e25abd163c..71f2924e4064fa5e3ca8ac785dc500921da48ad9"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-case-statements-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"case-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted a switch statement in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"case-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/case-statements.go b/case-statements.go",
|
||||
"index 0b4c9561..79058077 100644",
|
||||
"--- a/case-statements.go",
|
||||
"+++ b/case-statements.go",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-switch { }",
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "71f2924e4064fa5e3ca8ac785dc500921da48ad9..108e96251525765a292026d6bf8c51025a38edce"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-case-statements-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"case-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"case-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/case-statements.go b/case-statements.go",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/case-statements.go",
|
||||
"+++ b/case-statements.go",
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "108e96251525765a292026d6bf8c51025a38edce..5deef7045822271505960ed4cec253dedf122c38"
|
||||
}]
|
File diff suppressed because it is too large
Load Diff
284
test/corpus/diff-summaries/go/comment.json
Normal file
284
test/corpus/diff-summaries/go/comment.json
Normal file
@ -0,0 +1,284 @@
|
||||
[{
|
||||
"testCaseDescription": "go-comment-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"comment.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"comment.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/comment.go b/comment.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/comment.go",
|
||||
"+++ b/comment.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "2ff7aeec9c5efbeaf3a7b681f718640926ca1f90..74e82f0e6d4689ed73a303f79e35a56f42fd47d2"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-comment-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"comment.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
21
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the '// this is a comment' comment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"comment.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/comment.go b/comment.go",
|
||||
"index 79058077..61c10ca2 100644",
|
||||
"--- a/comment.go",
|
||||
"+++ b/comment.go",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+// this is a comment",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "74e82f0e6d4689ed73a303f79e35a56f42fd47d2..0d4ddf5fe3e61320b81f8c2392116951ac63bc19"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-comment-replacement-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"comment.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
21
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
3
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the '// this is a comment' comment with the '/*\nthis is a block comment\n*/' comment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"comment.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/comment.go b/comment.go",
|
||||
"index 61c10ca2..8e149b7b 100644",
|
||||
"--- a/comment.go",
|
||||
"+++ b/comment.go",
|
||||
"@@ -1,5 +1,7 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-// this is a comment",
|
||||
"+/*",
|
||||
"+this is a block comment",
|
||||
"+*/",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "0d4ddf5fe3e61320b81f8c2392116951ac63bc19..910896385d213cb7c06e2ead55a4b9abba069a36"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-comment-delete-replacement-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"comment.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
3
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
21
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the '/*\nthis is a block comment\n*/' comment with the '// this is a comment' comment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"comment.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/comment.go b/comment.go",
|
||||
"index 8e149b7b..61c10ca2 100644",
|
||||
"--- a/comment.go",
|
||||
"+++ b/comment.go",
|
||||
"@@ -1,7 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-/*",
|
||||
"-this is a block comment",
|
||||
"-*/",
|
||||
"+// this is a comment",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "910896385d213cb7c06e2ead55a4b9abba069a36..f129ff19da478611e72dc4a472f1fe440e32d7a8"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-comment-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"comment.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
21
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the '// this is a comment' comment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"comment.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/comment.go b/comment.go",
|
||||
"index 61c10ca2..79058077 100644",
|
||||
"--- a/comment.go",
|
||||
"+++ b/comment.go",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-// this is a comment",
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "f129ff19da478611e72dc4a472f1fe440e32d7a8..9db6c10b7cd6aeeda4a153ac070d38768258f376"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-comment-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"comment.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"comment.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/comment.go b/comment.go",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/comment.go",
|
||||
"+++ b/comment.go",
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "9db6c10b7cd6aeeda4a153ac070d38768258f376..96429faca853f0301df4b0d4d43ce26e3011129c"
|
||||
}]
|
@ -1,4 +1,46 @@
|
||||
[{
|
||||
"testCaseDescription": "go-const-declarations-with-types-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"const-declarations-with-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"const-declarations-with-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/const-declarations-with-types.go b/const-declarations-with-types.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/const-declarations-with-types.go",
|
||||
"+++ b/const-declarations-with-types.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "644992bcb04ee1c62efa585521dfe3bb1afbfe6e..0297a4066d1956454a339a227ecaa544f80c73bb"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-const-declarations-with-types-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
@ -7,16 +49,16 @@
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
4,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
19
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'zero' variable"
|
||||
"summary": "Added the 'zero' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -27,179 +69,19 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/const-declarations-with-types.go b/const-declarations-with-types.go",
|
||||
"index e69de29..da3bfc4 100644",
|
||||
"index 79058077..0adafada 100644",
|
||||
"--- a/const-declarations-with-types.go",
|
||||
"+++ b/const-declarations-with-types.go",
|
||||
"@@ -0,0 +1 @@",
|
||||
"+const zero int = 0"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "32b315c37909ee768458a4eb9ea7845a06769621..961d92cdc9ebd9a80f0727b86581998c21fda958"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-const-declarations-with-types-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"const-declarations-with-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
30
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'one' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
30
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'two' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
19
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'zero' variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"const-declarations-with-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/const-declarations-with-types.go b/const-declarations-with-types.go",
|
||||
"index da3bfc4..86f010e 100644",
|
||||
"--- a/const-declarations-with-types.go",
|
||||
"+++ b/const-declarations-with-types.go",
|
||||
"@@ -1 +1,3 @@",
|
||||
"+const one, two uiint64 = 1, 2",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+const zero int = 0",
|
||||
" const zero int = 0"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "961d92cdc9ebd9a80f0727b86581998c21fda958..779569ab17705797005da9a929df5042304d6020"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-const-declarations-with-types-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"const-declarations-with-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
10
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
11
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'one' identifier with the 'zero' identifier in the zero variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
26
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
27
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
18
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
19
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '1' with '0' in the zero variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
30
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'two' variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"const-declarations-with-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/const-declarations-with-types.go b/const-declarations-with-types.go",
|
||||
"index 86f010e..049ca7f 100644",
|
||||
"--- a/const-declarations-with-types.go",
|
||||
"+++ b/const-declarations-with-types.go",
|
||||
"@@ -1,3 +1,3 @@",
|
||||
"-const one, two uiint64 = 1, 2",
|
||||
"+const zero int = 0",
|
||||
" const zero int = 0",
|
||||
" const zero int = 0"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "779569ab17705797005da9a929df5042304d6020..f37b24c77b0054da8b553755c7729956dab62808"
|
||||
"shas": "0297a4066d1956454a339a227ecaa544f80c73bb..3f0ce32c60d690ee561e359b990714387959f548"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-const-declarations-with-types-replacement-test",
|
||||
@ -211,69 +93,69 @@
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
11
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
10
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'zero' identifier with the 'one' identifier in the one variable"
|
||||
"summary": "Replaced the 'zero' identifier with the 'one' identifier in the one var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
18
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
19
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
26
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
27
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '0' with '1' in the one variable"
|
||||
"summary": "Replaced '0' with '1' in the one var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
4,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
30
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'two' variable"
|
||||
"summary": "Added the 'two' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -284,17 +166,19 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/const-declarations-with-types.go b/const-declarations-with-types.go",
|
||||
"index 049ca7f..86f010e 100644",
|
||||
"index 0adafada..901589bf 100644",
|
||||
"--- a/const-declarations-with-types.go",
|
||||
"+++ b/const-declarations-with-types.go",
|
||||
"@@ -1,3 +1,3 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-const zero int = 0",
|
||||
"+const one, two uiint64 = 1, 2",
|
||||
" const zero int = 0",
|
||||
" const zero int = 0"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "f37b24c77b0054da8b553755c7729956dab62808..6294219449121c8cbd20d3ba524890dceb6e138e"
|
||||
"shas": "3f0ce32c60d690ee561e359b990714387959f548..d6726b3d4b9d3f399970027b9c1f44336005fe5f"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-const-declarations-with-types-delete-replacement-test",
|
||||
@ -303,78 +187,72 @@
|
||||
"const-declarations-with-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
30
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
10
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
11
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'one' variable"
|
||||
"summary": "Replaced the 'one' identifier with the 'zero' identifier in the zero var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
26
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
27
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
18
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
19
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '1' with '0' in the zero var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
4,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
30
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'two' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
19
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'zero' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
30
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'one' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
30
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'two' variable"
|
||||
"summary": "Deleted the 'two' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -385,20 +263,22 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/const-declarations-with-types.go b/const-declarations-with-types.go",
|
||||
"index 86f010e..f035105 100644",
|
||||
"index 901589bf..0adafada 100644",
|
||||
"--- a/const-declarations-with-types.go",
|
||||
"+++ b/const-declarations-with-types.go",
|
||||
"@@ -1,3 +1,2 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-const one, two uiint64 = 1, 2",
|
||||
"-const zero int = 0",
|
||||
" const zero int = 0",
|
||||
"+const one, two uiint64 = 1, 2"
|
||||
"+const zero int = 0",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "6294219449121c8cbd20d3ba524890dceb6e138e..7310b361570cf43ce24c55caf717fc64069a2d3b"
|
||||
"shas": "d6726b3d4b9d3f399970027b9c1f44336005fe5f..b4888b03cfd4e5faafd4fb28038de44168602f45"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-const-declarations-with-types-delete-test",
|
||||
"testCaseDescription": "go-const-declarations-with-types-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"const-declarations-with-types.go": [
|
||||
@ -406,16 +286,16 @@
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
4,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
19
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'zero' variable"
|
||||
"summary": "Deleted the 'zero' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -426,18 +306,22 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/const-declarations-with-types.go b/const-declarations-with-types.go",
|
||||
"index f035105..716746a 100644",
|
||||
"index 0adafada..79058077 100644",
|
||||
"--- a/const-declarations-with-types.go",
|
||||
"+++ b/const-declarations-with-types.go",
|
||||
"@@ -1,2 +1 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-const zero int = 0",
|
||||
" const one, two uiint64 = 1, 2"
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "7310b361570cf43ce24c55caf717fc64069a2d3b..c3d27a164e9197991bd4390391a3699327e8e1b0"
|
||||
"shas": "b4888b03cfd4e5faafd4fb28038de44168602f45..9fb1ea0a14644ad80945502ac972cfc78e083a72"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-const-declarations-with-types-delete-rest-test",
|
||||
"testCaseDescription": "go-const-declarations-with-types-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"const-declarations-with-types.go": [
|
||||
@ -449,27 +333,12 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
30
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'one' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
30
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'two' variable"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -480,12 +349,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/const-declarations-with-types.go b/const-declarations-with-types.go",
|
||||
"index 716746a..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/const-declarations-with-types.go",
|
||||
"+++ b/const-declarations-with-types.go",
|
||||
"@@ -1 +0,0 @@",
|
||||
"-const one, two uiint64 = 1, 2"
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "c3d27a164e9197991bd4390391a3699327e8e1b0..5352a466a13a8f3f02aa66c9a40c94ce75e0e613"
|
||||
"shas": "9fb1ea0a14644ad80945502ac972cfc78e083a72..0d1fc5e6274224d81271e5fc10b3dcd839d2c59e"
|
||||
}]
|
||||
|
@ -1,4 +1,46 @@
|
||||
[{
|
||||
"testCaseDescription": "go-const-declarations-without-types-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"const-declarations-without-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"const-declarations-without-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/const-declarations-without-types.go b/const-declarations-without-types.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/const-declarations-without-types.go",
|
||||
"+++ b/const-declarations-without-types.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "87617fd8faafd24f6979854f3e3b13694e836665..0ceb7e8e61fc3d084f24c489a88b9dbb6d1d90fa"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-const-declarations-without-types-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
@ -7,16 +49,16 @@
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
4,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
15
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'zero' variable"
|
||||
"summary": "Added the 'zero' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -27,179 +69,19 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/const-declarations-without-types.go b/const-declarations-without-types.go",
|
||||
"index e69de29..2f2e175 100644",
|
||||
"index 79058077..7ef3805e 100644",
|
||||
"--- a/const-declarations-without-types.go",
|
||||
"+++ b/const-declarations-without-types.go",
|
||||
"@@ -0,0 +1 @@",
|
||||
"+const zero = 0"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "e3cc7c05800e63045739cf83cc9bed769e582946..7893139bc48344b1c6e4eb30e84badf05a6da6b9"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-const-declarations-without-types-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"const-declarations-without-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
22
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'one' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
22
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'two' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
15
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'zero' variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"const-declarations-without-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/const-declarations-without-types.go b/const-declarations-without-types.go",
|
||||
"index 2f2e175..2d4a6fd 100644",
|
||||
"--- a/const-declarations-without-types.go",
|
||||
"+++ b/const-declarations-without-types.go",
|
||||
"@@ -1 +1,3 @@",
|
||||
"+const one, two = 1, 2",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+const zero = 0",
|
||||
" const zero = 0"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "7893139bc48344b1c6e4eb30e84badf05a6da6b9..f2ca37e6df2f0e6601317ce53fa41dae85ac6eb7"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-const-declarations-without-types-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"const-declarations-without-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
10
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
11
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'one' identifier with the 'zero' identifier in the zero variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
18
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
19
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
14
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
15
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '1' with '0' in the zero variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
22
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'two' variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"const-declarations-without-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/const-declarations-without-types.go b/const-declarations-without-types.go",
|
||||
"index 2d4a6fd..b60f29e 100644",
|
||||
"--- a/const-declarations-without-types.go",
|
||||
"+++ b/const-declarations-without-types.go",
|
||||
"@@ -1,3 +1,3 @@",
|
||||
"-const one, two = 1, 2",
|
||||
"+const zero = 0",
|
||||
" const zero = 0",
|
||||
" const zero = 0"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "f2ca37e6df2f0e6601317ce53fa41dae85ac6eb7..ac0f95fa20cf28c4db79a2d2a6ea3748cf3a5c53"
|
||||
"shas": "0ceb7e8e61fc3d084f24c489a88b9dbb6d1d90fa..45ad9f7abd0719ce42c5cdccf4628274d2b5d5f7"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-const-declarations-without-types-replacement-test",
|
||||
@ -211,69 +93,69 @@
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
11
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
10
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'zero' identifier with the 'one' identifier in the one variable"
|
||||
"summary": "Replaced the 'zero' identifier with the 'one' identifier in the one var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
14
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
15
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
18
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
19
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '0' with '1' in the one variable"
|
||||
"summary": "Replaced '0' with '1' in the one var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
4,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
22
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'two' variable"
|
||||
"summary": "Added the 'two' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -284,17 +166,19 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/const-declarations-without-types.go b/const-declarations-without-types.go",
|
||||
"index b60f29e..2d4a6fd 100644",
|
||||
"index 7ef3805e..c4525e24 100644",
|
||||
"--- a/const-declarations-without-types.go",
|
||||
"+++ b/const-declarations-without-types.go",
|
||||
"@@ -1,3 +1,3 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-const zero = 0",
|
||||
"+const one, two = 1, 2",
|
||||
" const zero = 0",
|
||||
" const zero = 0"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "ac0f95fa20cf28c4db79a2d2a6ea3748cf3a5c53..cc922e34d63773be705f8bb45da94eb6633d6d9d"
|
||||
"shas": "45ad9f7abd0719ce42c5cdccf4628274d2b5d5f7..1bafc1b266246fd616154a54053daa3ea7b06642"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-const-declarations-without-types-delete-replacement-test",
|
||||
@ -303,78 +187,72 @@
|
||||
"const-declarations-without-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
22
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
10
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
11
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'one' variable"
|
||||
"summary": "Replaced the 'one' identifier with the 'zero' identifier in the zero var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
18
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
19
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
14
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
15
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '1' with '0' in the zero var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
4,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
22
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'two' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
15
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'zero' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
22
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'one' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
22
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'two' variable"
|
||||
"summary": "Deleted the 'two' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -385,20 +263,22 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/const-declarations-without-types.go b/const-declarations-without-types.go",
|
||||
"index 2d4a6fd..0cb8229 100644",
|
||||
"index c4525e24..7ef3805e 100644",
|
||||
"--- a/const-declarations-without-types.go",
|
||||
"+++ b/const-declarations-without-types.go",
|
||||
"@@ -1,3 +1,2 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-const one, two = 1, 2",
|
||||
"-const zero = 0",
|
||||
" const zero = 0",
|
||||
"+const one, two = 1, 2"
|
||||
"+const zero = 0",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "cc922e34d63773be705f8bb45da94eb6633d6d9d..4f7206f8d97e09d920a16ed0d34acd5d03a7993a"
|
||||
"shas": "1bafc1b266246fd616154a54053daa3ea7b06642..656d4d3a01b343421bdd2347bf9c81a4eafe2975"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-const-declarations-without-types-delete-test",
|
||||
"testCaseDescription": "go-const-declarations-without-types-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"const-declarations-without-types.go": [
|
||||
@ -406,16 +286,16 @@
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
4,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
15
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'zero' variable"
|
||||
"summary": "Deleted the 'zero' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -426,18 +306,22 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/const-declarations-without-types.go b/const-declarations-without-types.go",
|
||||
"index 0cb8229..83cc71f 100644",
|
||||
"index 7ef3805e..79058077 100644",
|
||||
"--- a/const-declarations-without-types.go",
|
||||
"+++ b/const-declarations-without-types.go",
|
||||
"@@ -1,2 +1 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-const zero = 0",
|
||||
" const one, two = 1, 2"
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "4f7206f8d97e09d920a16ed0d34acd5d03a7993a..65836ac955a739028b5745b140b306784a47fadf"
|
||||
"shas": "656d4d3a01b343421bdd2347bf9c81a4eafe2975..a4ea9bfdc4648c4ab77b9378a7afae80e33c8085"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-const-declarations-without-types-delete-rest-test",
|
||||
"testCaseDescription": "go-const-declarations-without-types-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"const-declarations-without-types.go": [
|
||||
@ -449,27 +333,12 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
22
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'one' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
22
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'two' variable"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -480,12 +349,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/const-declarations-without-types.go b/const-declarations-without-types.go",
|
||||
"index 83cc71f..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/const-declarations-without-types.go",
|
||||
"+++ b/const-declarations-without-types.go",
|
||||
"@@ -1 +0,0 @@",
|
||||
"-const one, two = 1, 2"
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "65836ac955a739028b5745b140b306784a47fadf..32b315c37909ee768458a4eb9ea7845a06769621"
|
||||
"shas": "a4ea9bfdc4648c4ab77b9378a7afae80e33c8085..644992bcb04ee1c62efa585521dfe3bb1afbfe6e"
|
||||
}]
|
||||
|
@ -1,4 +1,46 @@
|
||||
[{
|
||||
"testCaseDescription": "go-const-with-implicit-values-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"const-with-implicit-values.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"const-with-implicit-values.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/const-with-implicit-values.go",
|
||||
"+++ b/const-with-implicit-values.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "358b31625272f975d35624a18f8337974c7a142d..e107a76ae19047adbef4f2592b27bbaa0763e858"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-const-with-implicit-values-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
@ -7,46 +49,46 @@
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
5,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
3
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'zero' variable"
|
||||
"summary": "Added the 'zero' var assignment in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
6,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
3
|
||||
6,
|
||||
5
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'one' variable"
|
||||
"summary": "Added the 'one' identifier in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
7,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
3
|
||||
7,
|
||||
5
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'two' variable"
|
||||
"summary": "Added the 'two' identifier in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -57,257 +99,23 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
|
||||
"index e69de29..938a571 100644",
|
||||
"index 79058077..d98ee4cf 100644",
|
||||
"--- a/const-with-implicit-values.go",
|
||||
"+++ b/const-with-implicit-values.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+const (",
|
||||
"+ zero = iota",
|
||||
"+ one",
|
||||
"+ two",
|
||||
"+ )"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "eab68be4fe73c7ea63793058e38316a7eab75064..9c08f71afc4f67ed8399c2904fa3c511085e32fa"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-const-with-implicit-values-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"const-with-implicit-values.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'c' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'zero' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'one' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'two' variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"const-with-implicit-values.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
|
||||
"index 938a571..071b359 100644",
|
||||
"--- a/const-with-implicit-values.go",
|
||||
"+++ b/const-with-implicit-values.go",
|
||||
"@@ -1,4 +1,14 @@",
|
||||
" const (",
|
||||
"+ a = iota",
|
||||
"+ b",
|
||||
"+ c",
|
||||
"+ )",
|
||||
"@@ -1,5 +1,9 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+const (",
|
||||
"+ zero = iota",
|
||||
"+ one",
|
||||
"+ two",
|
||||
"+ )",
|
||||
"+const (",
|
||||
" zero = iota",
|
||||
" one",
|
||||
" two"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "9c08f71afc4f67ed8399c2904fa3c511085e32fa..a3fffc055f14421a39ce87b49fc3ac583af306f1"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-const-with-implicit-values-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"const-with-implicit-values.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
3
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
6
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'a' identifier with the 'zero' identifier in the zero variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
3
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'b' identifier with the 'one' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
3
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'c' identifier with the 'two' identifier"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"const-with-implicit-values.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
|
||||
"index 071b359..8a6d638 100644",
|
||||
"--- a/const-with-implicit-values.go",
|
||||
"+++ b/const-with-implicit-values.go",
|
||||
"@@ -1,7 +1,7 @@",
|
||||
" const (",
|
||||
"- a = iota",
|
||||
"- b",
|
||||
"- c",
|
||||
"+ zero = iota",
|
||||
"+ one",
|
||||
"+ two",
|
||||
" )",
|
||||
" const (",
|
||||
" zero = iota"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "a3fffc055f14421a39ce87b49fc3ac583af306f1..2c83dd0ff7ac9b61cd2d2155917f60c1578bd472"
|
||||
"shas": "e107a76ae19047adbef4f2592b27bbaa0763e858..5927bf13ce0779493a7306cdab8a1e613616de7a"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-const-with-implicit-values-replacement-test",
|
||||
@ -319,81 +127,81 @@
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
6
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
3
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'zero' identifier with the 'a' identifier in the a variable"
|
||||
"summary": "Replaced the 'zero' identifier with the 'a' identifier in the a var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
6,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
6,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
6,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
6,
|
||||
3
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'one' identifier with the 'b' identifier"
|
||||
"summary": "Replaced the 'one' identifier with the 'b' identifier in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
7,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
7,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
7,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
7,
|
||||
3
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'two' identifier with the 'c' identifier"
|
||||
"summary": "Replaced the 'two' identifier with the 'c' identifier in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -404,10 +212,12 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
|
||||
"index 8a6d638..071b359 100644",
|
||||
"index d98ee4cf..c4c9127b 100644",
|
||||
"--- a/const-with-implicit-values.go",
|
||||
"+++ b/const-with-implicit-values.go",
|
||||
"@@ -1,7 +1,7 @@",
|
||||
"@@ -2,8 +2,8 @@ package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
" const (",
|
||||
"- zero = iota",
|
||||
"- one",
|
||||
@ -416,11 +226,10 @@
|
||||
"+ b",
|
||||
"+ c",
|
||||
" )",
|
||||
" const (",
|
||||
" zero = iota"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "2c83dd0ff7ac9b61cd2d2155917f60c1578bd472..eaa7f3281ecec5fa706b862a28ae1cfbcdac382d"
|
||||
"shas": "5927bf13ce0779493a7306cdab8a1e613616de7a..181005c8bc218381c82e9554c9b7802f493a2781"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-const-with-implicit-values-delete-replacement-test",
|
||||
@ -429,138 +238,84 @@
|
||||
"const-with-implicit-values.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
3
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
3
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
6
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'a' variable"
|
||||
"summary": "Replaced the 'a' identifier with the 'zero' identifier in the zero var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
3
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
3
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'b' variable"
|
||||
"summary": "Replaced the 'b' identifier with the 'one' identifier in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
3
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
7,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
3
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
7,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'c' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'zero' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'one' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'two' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'c' variable"
|
||||
"summary": "Replaced the 'c' identifier with the 'two' identifier in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -571,34 +326,27 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
|
||||
"index 071b359..ae8b277 100644",
|
||||
"index c4c9127b..d98ee4cf 100644",
|
||||
"--- a/const-with-implicit-values.go",
|
||||
"+++ b/const-with-implicit-values.go",
|
||||
"@@ -1,15 +1,10 @@",
|
||||
"@@ -2,8 +2,8 @@ package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
" const (",
|
||||
"- a = iota",
|
||||
"- b",
|
||||
"- c",
|
||||
"- )",
|
||||
"-const (",
|
||||
" zero = iota",
|
||||
" one",
|
||||
" two",
|
||||
"+ zero = iota",
|
||||
"+ one",
|
||||
"+ two",
|
||||
" )",
|
||||
" const (",
|
||||
"- zero = iota",
|
||||
"- one",
|
||||
"- two",
|
||||
"+ a = iota",
|
||||
"+ b",
|
||||
"+ c",
|
||||
" )"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "eaa7f3281ecec5fa706b862a28ae1cfbcdac382d..697b694fcc19b4223284ab44c961bd9544dcdaa3"
|
||||
"shas": "181005c8bc218381c82e9554c9b7802f493a2781..991bc37844c90993f716c7496c5778ec3ef7f612"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-const-with-implicit-values-delete-test",
|
||||
"testCaseDescription": "go-const-with-implicit-values-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"const-with-implicit-values.go": [
|
||||
@ -606,46 +354,46 @@
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
5,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
3
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'zero' variable"
|
||||
"summary": "Deleted the 'zero' var assignment in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
6,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
3
|
||||
6,
|
||||
5
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'one' variable"
|
||||
"summary": "Deleted the 'one' identifier in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
7,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
3
|
||||
7,
|
||||
5
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'two' variable"
|
||||
"summary": "Deleted the 'two' identifier in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -656,25 +404,26 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
|
||||
"index ae8b277..dfb4fad 100644",
|
||||
"index d98ee4cf..79058077 100644",
|
||||
"--- a/const-with-implicit-values.go",
|
||||
"+++ b/const-with-implicit-values.go",
|
||||
"@@ -1,9 +1,4 @@",
|
||||
" const (",
|
||||
"@@ -1,9 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-const (",
|
||||
"- zero = iota",
|
||||
"- one",
|
||||
"- two",
|
||||
"- )",
|
||||
"-const (",
|
||||
" a = iota",
|
||||
" b",
|
||||
" c"
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "697b694fcc19b4223284ab44c961bd9544dcdaa3..512cbb151aefa21474c28b2baae09a6eee09bcf5"
|
||||
"shas": "991bc37844c90993f716c7496c5778ec3ef7f612..2cc4ccb68ae849d4332a1e8c89a17225522db446"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-const-with-implicit-values-delete-rest-test",
|
||||
"testCaseDescription": "go-const-with-implicit-values-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"const-with-implicit-values.go": [
|
||||
@ -686,42 +435,12 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'c' variable"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -732,16 +451,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
|
||||
"index dfb4fad..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/const-with-implicit-values.go",
|
||||
"+++ b/const-with-implicit-values.go",
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-const (",
|
||||
"- a = iota",
|
||||
"- b",
|
||||
"- c",
|
||||
"- )"
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "512cbb151aefa21474c28b2baae09a6eee09bcf5..966bee07072f36b83494af4ac7d3c83673e1f3f8"
|
||||
"shas": "2cc4ccb68ae849d4332a1e8c89a17225522db446..d857a5e809451235a1566b3bd2e315a9cdf9213f"
|
||||
}]
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,69 +1,56 @@
|
||||
[{
|
||||
"testCaseDescription": "go-function-literals-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"function-literals.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"function-literals.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/function-literals.go b/function-literals.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/function-literals.go",
|
||||
"+++ b/function-literals.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "ef42f9e80388d7180896d3d04b0140b1760b8cde..1fb1e9f61f626d60fe3e512332836e31a56fc8b7"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-function-literals-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"function-literals.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 's1' variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"function-literals.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/function-literals.go b/function-literals.go",
|
||||
"index e69de29..49cbe77 100644",
|
||||
"--- a/function-literals.go",
|
||||
"+++ b/function-literals.go",
|
||||
"@@ -0,0 +1,3 @@",
|
||||
"+const s1 = func(s string) (int, int) {",
|
||||
"+return 1, 2",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "8cef11ced56e7aed74af10acde19377ccfe0b6af..1dc216376d4051127f8fc7833470538864904865"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-function-literals-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"function-literals.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 's1' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
@ -71,7 +58,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 's1' variable"
|
||||
"summary": "Added the 's1' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -82,103 +69,21 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/function-literals.go b/function-literals.go",
|
||||
"index 49cbe77..913c35a 100644",
|
||||
"index 79058077..1f4ead96 100644",
|
||||
"--- a/function-literals.go",
|
||||
"+++ b/function-literals.go",
|
||||
"@@ -1,3 +1,9 @@",
|
||||
"+const s1 = func(b int) (string, string) {",
|
||||
"+return 1, 2",
|
||||
"+}",
|
||||
"@@ -1,5 +1,7 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+const s1 = func(s string) (int, int) {",
|
||||
"+return 1, 2",
|
||||
"+}",
|
||||
" const s1 = func(s string) (int, int) {",
|
||||
" return 1, 2",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "1dc216376d4051127f8fc7833470538864904865..0a1fc24e689a77c0b136e4702b5328ccfac82601"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-function-literals-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"function-literals.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
17
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
18
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
17
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
18
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'b' identifier with the 's' identifier in the s1 variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
19
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
22
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
19
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
25
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'int' identifier with the 'string' identifier in the s1 variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"function-literals.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/function-literals.go b/function-literals.go",
|
||||
"index 913c35a..731e2c6 100644",
|
||||
"--- a/function-literals.go",
|
||||
"+++ b/function-literals.go",
|
||||
"@@ -1,4 +1,4 @@",
|
||||
"-const s1 = func(b int) (string, string) {",
|
||||
"+const s1 = func(s string) (int, int) {",
|
||||
" return 1, 2",
|
||||
" }",
|
||||
" const s1 = func(s string) (int, int) {"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "0a1fc24e689a77c0b136e4702b5328ccfac82601..a91d7138a089662fc0100619eaeff8fd15c4fbed"
|
||||
"shas": "1fb1e9f61f626d60fe3e512332836e31a56fc8b7..3ab7c922ad81c7b10bc94a5a9fd51735a79671f9"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-function-literals-replacement-test",
|
||||
@ -190,54 +95,54 @@
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
17
|
||||
4,
|
||||
19
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
18
|
||||
4,
|
||||
25
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
17
|
||||
4,
|
||||
19
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
18
|
||||
4,
|
||||
22
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 's' identifier with the 'b' identifier in the s1 variable"
|
||||
"summary": "Replaced the 'string' identifier with the 'int' identifier in the s1 var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
19
|
||||
4,
|
||||
17
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
25
|
||||
4,
|
||||
18
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
19
|
||||
4,
|
||||
17
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
22
|
||||
4,
|
||||
18
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'string' identifier with the 'int' identifier in the s1 variable"
|
||||
"summary": "Replaced the 's' identifier with the 'b' identifier in the s1 var assignment of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -248,18 +153,21 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/function-literals.go b/function-literals.go",
|
||||
"index 731e2c6..913c35a 100644",
|
||||
"index 1f4ead96..7b034662 100644",
|
||||
"--- a/function-literals.go",
|
||||
"+++ b/function-literals.go",
|
||||
"@@ -1,4 +1,4 @@",
|
||||
"@@ -1,7 +1,7 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-const s1 = func(s string) (int, int) {",
|
||||
"+const s1 = func(b int) (string, string) {",
|
||||
" return 1, 2",
|
||||
" }",
|
||||
" const s1 = func(s string) (int, int) {"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "a91d7138a089662fc0100619eaeff8fd15c4fbed..ad88b2ad21c0631a650d20f3b876ef0db92ec589"
|
||||
"shas": "3ab7c922ad81c7b10bc94a5a9fd51735a79671f9..2c577ddb1557a779eba3c8e71cc1d0fbcb2cba8d"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-function-literals-delete-replacement-test",
|
||||
@ -268,48 +176,57 @@
|
||||
"function-literals.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
2
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
19
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
22
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
19
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
25
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 's1' variable"
|
||||
"summary": "Replaced the 'int' identifier with the 'string' identifier in the s1 var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
2
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
17
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
18
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
17
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
18
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 's1' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 's1' variable"
|
||||
"summary": "Replaced the 'b' identifier with the 's' identifier in the s1 var assignment of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -320,26 +237,24 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/function-literals.go b/function-literals.go",
|
||||
"index 913c35a..51820bc 100644",
|
||||
"index 7b034662..1f4ead96 100644",
|
||||
"--- a/function-literals.go",
|
||||
"+++ b/function-literals.go",
|
||||
"@@ -1,9 +1,6 @@",
|
||||
"@@ -1,7 +1,7 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-const s1 = func(b int) (string, string) {",
|
||||
"-return 1, 2",
|
||||
"-}",
|
||||
" const s1 = func(s string) (int, int) {",
|
||||
"+const s1 = func(s string) (int, int) {",
|
||||
" return 1, 2",
|
||||
" }",
|
||||
"-const s1 = func(s string) (int, int) {",
|
||||
"+const s1 = func(b int) (string, string) {",
|
||||
" return 1, 2",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "ad88b2ad21c0631a650d20f3b876ef0db92ec589..54387de238ddc7806f785f4b874a5fcf20c70808"
|
||||
"shas": "2c577ddb1557a779eba3c8e71cc1d0fbcb2cba8d..7dcf732eb420094b92c6079a6a179d728d2df17c"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-function-literals-delete-test",
|
||||
"testCaseDescription": "go-function-literals-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"function-literals.go": [
|
||||
@ -347,16 +262,16 @@
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
4,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
6,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 's1' variable"
|
||||
"summary": "Deleted the 's1' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -367,22 +282,24 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/function-literals.go b/function-literals.go",
|
||||
"index 51820bc..d21dc2d 100644",
|
||||
"index 1f4ead96..79058077 100644",
|
||||
"--- a/function-literals.go",
|
||||
"+++ b/function-literals.go",
|
||||
"@@ -1,6 +1,3 @@",
|
||||
"@@ -1,7 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-const s1 = func(s string) (int, int) {",
|
||||
"-return 1, 2",
|
||||
"-}",
|
||||
" const s1 = func(b int) (string, string) {",
|
||||
" return 1, 2",
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "54387de238ddc7806f785f4b874a5fcf20c70808..68548df887acedb0540ef6087756db5c6a0a5c47"
|
||||
"shas": "7dcf732eb420094b92c6079a6a179d728d2df17c..c2c89a674013bfa2b8679db2532dee1d1453becb"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-function-literals-delete-rest-test",
|
||||
"testCaseDescription": "go-function-literals-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"function-literals.go": [
|
||||
@ -394,12 +311,12 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
2
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 's1' variable"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -410,14 +327,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/function-literals.go b/function-literals.go",
|
||||
"index d21dc2d..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/function-literals.go",
|
||||
"+++ b/function-literals.go",
|
||||
"@@ -1,3 +0,0 @@",
|
||||
"-const s1 = func(b int) (string, string) {",
|
||||
"-return 1, 2",
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "68548df887acedb0540ef6087756db5c6a0a5c47..e3cc7c05800e63045739cf83cc9bed769e582946"
|
||||
"shas": "c2c89a674013bfa2b8679db2532dee1d1453becb..87617fd8faafd24f6979854f3e3b13694e836665"
|
||||
}]
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,107 +1,50 @@
|
||||
[{
|
||||
"testCaseDescription": "go-go-and-defer-statements-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"go-and-defer-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"go-and-defer-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/go-and-defer-statements.go b/go-and-defer-statements.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/go-and-defer-statements.go",
|
||||
"+++ b/go-and-defer-statements.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "c14d55dd062dc340dde5986bd08c8b6aa1173023..278def98e925c3f8c4c39e7b82e6d4e93d3f6f01"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-go-and-defer-statements-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"go-and-defer-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
12
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'x[y]()' function call"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'x[y]()' go statement"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"go-and-defer-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/go-and-defer-statements.go b/go-and-defer-statements.go",
|
||||
"index e69de29..2638f27 100644",
|
||||
"--- a/go-and-defer-statements.go",
|
||||
"+++ b/go-and-defer-statements.go",
|
||||
"@@ -0,0 +1,2 @@",
|
||||
"+defer x.y()",
|
||||
"+go x.y()"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "aa6d103c0bde1c5cd7c122b6a597939f9920694d..39d794d96184f5c24d53575d9acf0c1408848019"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-go-and-defer-statements-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"go-and-defer-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
12
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a[b]()' defer statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'c[d]()' go statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
12
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'x[y]()' defer statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
@ -111,11 +54,11 @@
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
9
|
||||
12
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'x[y]()' go statement"
|
||||
"summary": "Added the 'x[y]()' defer statement in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
@ -126,26 +69,11 @@
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
12
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'x[y]()' defer statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
12
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'x[y]()' function call"
|
||||
"summary": "Added the 'x[y]()' go statement in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -156,156 +84,20 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/go-and-defer-statements.go b/go-and-defer-statements.go",
|
||||
"index 2638f27..0cb11d5 100644",
|
||||
"index 79058077..4eab4994 100644",
|
||||
"--- a/go-and-defer-statements.go",
|
||||
"+++ b/go-and-defer-statements.go",
|
||||
"@@ -1,2 +1,6 @@",
|
||||
"+defer a.b()",
|
||||
"+go c.d()",
|
||||
"@@ -1,5 +1,6 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+defer x.y()",
|
||||
"+go x.y()",
|
||||
" defer x.y()",
|
||||
" go x.y()"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "39d794d96184f5c24d53575d9acf0c1408848019..f00940bceca8647dfc5c03a16d11fa77b65605ab"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-go-and-defer-statements-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"go-and-defer-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
8
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
8
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'a' identifier with the 'x' identifier in the x[y] subscript access"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
10
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
10
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'b' identifier with the 'y' identifier in the x[y] subscript access"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'c' identifier with the 'x' identifier in the x[y] subscript access"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
7
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
7
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'd' identifier with the 'y' identifier in the x[y] subscript access"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"go-and-defer-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/go-and-defer-statements.go b/go-and-defer-statements.go",
|
||||
"index 0cb11d5..bdc42aa 100644",
|
||||
"--- a/go-and-defer-statements.go",
|
||||
"+++ b/go-and-defer-statements.go",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
"-defer a.b()",
|
||||
"-go c.d()",
|
||||
"+defer x.y()",
|
||||
"+go x.y()",
|
||||
" defer x.y()",
|
||||
" go x.y()",
|
||||
" defer x.y()"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "f00940bceca8647dfc5c03a16d11fa77b65605ab..a438dd8c1ac73cefd028b38d896c9e7150693fda"
|
||||
"shas": "278def98e925c3f8c4c39e7b82e6d4e93d3f6f01..77af86d247af5374e02a3083387901e4f6055d85"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-go-and-defer-statements-replacement-test",
|
||||
@ -317,108 +109,108 @@
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
8
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
8
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'x' identifier with the 'a' identifier in the a[b] subscript access"
|
||||
"summary": "Replaced the 'x' identifier with the 'a' identifier in the a[b] subscript access of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
10
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
10
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'y' identifier with the 'b' identifier in the a[b] subscript access"
|
||||
"summary": "Replaced the 'y' identifier with the 'b' identifier in the a[b] subscript access of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'x' identifier with the 'c' identifier in the c[d] subscript access"
|
||||
"summary": "Replaced the 'x' identifier with the 'c' identifier in the c[d] subscript access of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
7
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
7
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'y' identifier with the 'd' identifier in the c[d] subscript access"
|
||||
"summary": "Replaced the 'y' identifier with the 'd' identifier in the c[d] subscript access of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -429,20 +221,21 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/go-and-defer-statements.go b/go-and-defer-statements.go",
|
||||
"index bdc42aa..0cb11d5 100644",
|
||||
"index 4eab4994..0537c4bc 100644",
|
||||
"--- a/go-and-defer-statements.go",
|
||||
"+++ b/go-and-defer-statements.go",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
"@@ -1,6 +1,6 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-defer x.y()",
|
||||
"-go x.y()",
|
||||
"+defer a.b()",
|
||||
"+go c.d()",
|
||||
" defer x.y()",
|
||||
" go x.y()",
|
||||
" defer x.y()"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "a438dd8c1ac73cefd028b38d896c9e7150693fda..be9ca54744a56600853a24a3574f6a9372317a4e"
|
||||
"shas": "77af86d247af5374e02a3083387901e4f6055d85..3195df01c958961855d16db8dd512ca3db0b4cec"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-go-and-defer-statements-delete-replacement-test",
|
||||
@ -451,93 +244,111 @@
|
||||
"go-and-defer-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
12
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
8
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
8
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'a[b]()' defer statement"
|
||||
"summary": "Replaced the 'a' identifier with the 'x' identifier in the x[y] subscript access of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
9
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
10
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
10
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'c[d]()' go statement"
|
||||
"summary": "Replaced the 'b' identifier with the 'y' identifier in the x[y] subscript access of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
12
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'x[y]()' defer statement"
|
||||
"summary": "Replaced the 'c' identifier with the 'x' identifier in the x[y] subscript access of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
9
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
7
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
7
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'x[y]()' go statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
12
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a[b]()' defer statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'c[d]()' go statement"
|
||||
"summary": "Replaced the 'd' identifier with the 'y' identifier in the x[y] subscript access of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -548,86 +359,56 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/go-and-defer-statements.go b/go-and-defer-statements.go",
|
||||
"index 0cb11d5..f18666e 100644",
|
||||
"index 0537c4bc..4eab4994 100644",
|
||||
"--- a/go-and-defer-statements.go",
|
||||
"+++ b/go-and-defer-statements.go",
|
||||
"@@ -1,6 +1,4 @@",
|
||||
"@@ -1,6 +1,6 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-defer a.b()",
|
||||
"-go c.d()",
|
||||
"-defer x.y()",
|
||||
"-go x.y()",
|
||||
" defer x.y()",
|
||||
" go x.y()",
|
||||
"+defer a.b()",
|
||||
"+go c.d()"
|
||||
"+defer x.y()",
|
||||
"+go x.y()",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "be9ca54744a56600853a24a3574f6a9372317a4e..8aed3cad89b295cbb44d0af3d14a133805b21092"
|
||||
"shas": "3195df01c958961855d16db8dd512ca3db0b4cec..66da4d913b11ceae987aa3dbbcce0da116e3ee12"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-go-and-defer-statements-delete-test",
|
||||
"testCaseDescription": "go-go-and-defer-statements-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"go-and-defer-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
7
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
12
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a[b]()' function call"
|
||||
"summary": "Deleted the 'x[y]()' defer statement in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
12
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'x[y]()' defer statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'x[y]()' go statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
12
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a[b]()' defer statement"
|
||||
"summary": "Deleted the 'x[y]()' go statement in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -638,20 +419,23 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/go-and-defer-statements.go b/go-and-defer-statements.go",
|
||||
"index f18666e..eefd2e4 100644",
|
||||
"index 4eab4994..79058077 100644",
|
||||
"--- a/go-and-defer-statements.go",
|
||||
"+++ b/go-and-defer-statements.go",
|
||||
"@@ -1,4 +1,2 @@",
|
||||
"@@ -1,6 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-defer x.y()",
|
||||
"-go x.y()",
|
||||
" defer a.b()",
|
||||
" go c.d()"
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "8aed3cad89b295cbb44d0af3d14a133805b21092..2597c988897b6b96cb121f2abfda7a34f3a2e78a"
|
||||
"shas": "66da4d913b11ceae987aa3dbbcce0da116e3ee12..385153e6284f16b53e7195c7f3e4d8d0299ecc15"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-go-and-defer-statements-delete-rest-test",
|
||||
"testCaseDescription": "go-go-and-defer-statements-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"go-and-defer-statements.go": [
|
||||
@ -660,30 +444,15 @@
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
12
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a[b]()' function call"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
9
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'c[d]()' go statement"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -694,13 +463,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/go-and-defer-statements.go b/go-and-defer-statements.go",
|
||||
"index eefd2e4..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/go-and-defer-statements.go",
|
||||
"+++ b/go-and-defer-statements.go",
|
||||
"@@ -1,2 +0,0 @@",
|
||||
"-defer a.b()",
|
||||
"-go c.d()"
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "2597c988897b6b96cb121f2abfda7a34f3a2e78a..1b6e0feb56e5cdb7ad291617f2f0435417e65665"
|
||||
"shas": "385153e6284f16b53e7195c7f3e4d8d0299ecc15..f9136e3be46a93bc0e0b6dc467c7b9ced1b97894"
|
||||
}]
|
||||
|
@ -1,5 +1,5 @@
|
||||
[{
|
||||
"testCaseDescription": "go-grouped-import-declarations-insert-test",
|
||||
"testCaseDescription": "go-grouped-import-declarations-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"grouped-import-declarations.go": [
|
||||
@ -11,282 +11,12 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the \"net/http\" import statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the \"some/dsl\" import statement"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {
|
||||
"grouped-import-declarations.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'import (\n\"net/http\"\n . \"some/dsl\"\n alias \"some/package\"\n)' at line 1, column 1 - line 5, column 2"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"filePaths": [
|
||||
"grouped-import-declarations.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
|
||||
"index e69de29..6560136 100644",
|
||||
"--- a/grouped-import-declarations.go",
|
||||
"+++ b/grouped-import-declarations.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+import (",
|
||||
"+\"net/http\"",
|
||||
"+ . \"some/dsl\"",
|
||||
"+ alias \"some/package\"",
|
||||
"+)"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "3a1a004fc80ca40433336cc35ed31bd631b4d589..233d90c5a8f2097b27795d5e5e5eecc5c3415a31"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-grouped-import-declarations-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"grouped-import-declarations.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the \"net/socket\" import statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the \"types/dsl\" import statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the \"net/http\" import statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the \"some/dsl\" import statement"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {
|
||||
"grouped-import-declarations.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'import (\n\"net/socket\"\n . \"types/dsl\"\n alias \"awesome/package\"\n)' at line 1, column 1 - line 5, column 2"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'import (\n\"net/http\"\n . \"some/dsl\"\n alias \"some/package\"\n)' at line 6, column 1 - line 10, column 2"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"filePaths": [
|
||||
"grouped-import-declarations.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
|
||||
"index 6560136..31d6bd7 100644",
|
||||
"--- a/grouped-import-declarations.go",
|
||||
"+++ b/grouped-import-declarations.go",
|
||||
"@@ -1,4 +1,14 @@",
|
||||
" import (",
|
||||
"+\"net/socket\"",
|
||||
"+ . \"types/dsl\"",
|
||||
"+ alias \"awesome/package\"",
|
||||
"+)",
|
||||
"+import (",
|
||||
"+\"net/http\"",
|
||||
"+ . \"some/dsl\"",
|
||||
"+ alias \"some/package\"",
|
||||
"+)",
|
||||
"+import (",
|
||||
" \"net/http\"",
|
||||
" . \"some/dsl\"",
|
||||
" alias \"some/package\""
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "233d90c5a8f2097b27795d5e5e5eecc5c3415a31..78e66d25bd964ed3c89453c89f7aaae054c874f0"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-grouped-import-declarations-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"grouped-import-declarations.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
13
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
11
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the \"net/socket\" string with the \"net/http\" string in the \"net/http\" import statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
16
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
15
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the \"types/dsl\" string with the \"some/dsl\" string in the \"some/dsl\" import statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
26
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
23
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the \"awesome/package\" string with the \"some/package\" string"
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -297,23 +27,65 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
|
||||
"index 31d6bd7..b045ab3 100644",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/grouped-import-declarations.go",
|
||||
"+++ b/grouped-import-declarations.go",
|
||||
"@@ -1,7 +1,7 @@",
|
||||
" import (",
|
||||
"-\"net/socket\"",
|
||||
"- . \"types/dsl\"",
|
||||
"- alias \"awesome/package\"",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "6bee120701f5e3c15b3f8a13d4ead70d225091d1..c5b7e7d94b3d71f376c335e1fef631814f11a748"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-grouped-import-declarations-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {},
|
||||
"errors": {
|
||||
"grouped-import-declarations.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added 'import (\n\"net/http\"\n . \"some/dsl\"\n alias \"some/package\"\n)' at line 4, column 1 - line 8, column 2 in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"filePaths": [
|
||||
"grouped-import-declarations.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
|
||||
"index 79058077..b544dded 100644",
|
||||
"--- a/grouped-import-declarations.go",
|
||||
"+++ b/grouped-import-declarations.go",
|
||||
"@@ -1,5 +1,9 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+import (",
|
||||
"+\"net/http\"",
|
||||
"+ . \"some/dsl\"",
|
||||
"+ alias \"some/package\"",
|
||||
" )",
|
||||
" import (",
|
||||
" \"net/http\""
|
||||
"+)",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "78e66d25bd964ed3c89453c89f7aaae054c874f0..e37ef96d6ab2271602eb954f430703de6c409c55"
|
||||
"shas": "c5b7e7d94b3d71f376c335e1fef631814f11a748..f7d189cc5f3c9f36ecf1a2e78f21b522b2d5f8fd"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-grouped-import-declarations-replacement-test",
|
||||
@ -325,81 +97,81 @@
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
11
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
13
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the \"net/http\" string with the \"net/socket\" string in the \"net/socket\" import statement"
|
||||
"summary": "Replaced the \"net/http\" string with the \"net/socket\" string in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
6,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
6,
|
||||
15
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
6,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
6,
|
||||
16
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the \"some/dsl\" string with the \"types/dsl\" string in the \"types/dsl\" import statement"
|
||||
"summary": "Replaced the \"some/dsl\" string with the \"types/dsl\" string in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
7,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
7,
|
||||
23
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
7,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
7,
|
||||
26
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the \"some/package\" string with the \"awesome/package\" string"
|
||||
"summary": "Replaced the \"some/package\" string with the \"awesome/package\" string in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -410,10 +182,12 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
|
||||
"index b045ab3..31d6bd7 100644",
|
||||
"index b544dded..1fd89e1d 100644",
|
||||
"--- a/grouped-import-declarations.go",
|
||||
"+++ b/grouped-import-declarations.go",
|
||||
"@@ -1,7 +1,7 @@",
|
||||
"@@ -2,8 +2,8 @@ package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
" import (",
|
||||
"-\"net/http\"",
|
||||
"- . \"some/dsl\"",
|
||||
@ -422,11 +196,10 @@
|
||||
"+ . \"types/dsl\"",
|
||||
"+ alias \"awesome/package\"",
|
||||
" )",
|
||||
" import (",
|
||||
" \"net/http\""
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "e37ef96d6ab2271602eb954f430703de6c409c55..90f9553085893a3d87bd9797f65d3083643431c4"
|
||||
"shas": "f7d189cc5f3c9f36ecf1a2e78f21b522b2d5f8fd..998dec80a305b10415e56b3ee3b87e5204450f83"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-grouped-import-declarations-delete-replacement-test",
|
||||
@ -435,230 +208,133 @@
|
||||
"grouped-import-declarations.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
2
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
13
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
11
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the \"net/socket\" import statement"
|
||||
"summary": "Replaced the \"net/socket\" string with the \"net/http\" string in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
2
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
16
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
15
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the \"types/dsl\" import statement"
|
||||
"summary": "Replaced the \"types/dsl\" string with the \"some/dsl\" string in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
2
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
7,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
26
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
7,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
23
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the \"net/http\" import statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the \"some/dsl\" import statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the \"net/socket\" import statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the \"types/dsl\" import statement"
|
||||
"summary": "Replaced the \"awesome/package\" string with the \"some/package\" string in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {
|
||||
"grouped-import-declarations.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'import (\n\"net/socket\"\n . \"types/dsl\"\n alias \"awesome/package\"\n)' at line 1, column 1 - line 5, column 2"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'import (\n\"net/http\"\n . \"some/dsl\"\n alias \"some/package\"\n)' at line 6, column 1 - line 10, column 2"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'import (\n\"net/socket\"\n . \"types/dsl\"\n alias \"awesome/package\"\n)' at line 6, column 1 - line 10, column 2"
|
||||
}
|
||||
]
|
||||
}
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"grouped-import-declarations.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
|
||||
"index 31d6bd7..62facc6 100644",
|
||||
"index 1fd89e1d..b544dded 100644",
|
||||
"--- a/grouped-import-declarations.go",
|
||||
"+++ b/grouped-import-declarations.go",
|
||||
"@@ -1,15 +1,10 @@",
|
||||
"@@ -2,8 +2,8 @@ package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
" import (",
|
||||
"-\"net/socket\"",
|
||||
"- . \"types/dsl\"",
|
||||
"- alias \"awesome/package\"",
|
||||
"-)",
|
||||
"-import (",
|
||||
" \"net/http\"",
|
||||
" . \"some/dsl\"",
|
||||
" alias \"some/package\"",
|
||||
"+\"net/http\"",
|
||||
"+ . \"some/dsl\"",
|
||||
"+ alias \"some/package\"",
|
||||
" )",
|
||||
" import (",
|
||||
"-\"net/http\"",
|
||||
"- . \"some/dsl\"",
|
||||
"- alias \"some/package\"",
|
||||
"+\"net/socket\"",
|
||||
"+ . \"types/dsl\"",
|
||||
"+ alias \"awesome/package\"",
|
||||
" )"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "90f9553085893a3d87bd9797f65d3083643431c4..5ea9646b5663b469d1d05d122fc573b0bbf249b6"
|
||||
"shas": "998dec80a305b10415e56b3ee3b87e5204450f83..de107f343c5ef74a0ffff791e8b1f0a277065bd1"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-grouped-import-declarations-delete-test",
|
||||
"testCaseDescription": "go-grouped-import-declarations-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"grouped-import-declarations.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the \"net/http\" import statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the \"some/dsl\" import statement"
|
||||
}
|
||||
]
|
||||
},
|
||||
"changes": {},
|
||||
"errors": {
|
||||
"grouped-import-declarations.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
8,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'import (\n\"net/http\"\n . \"some/dsl\"\n alias \"some/package\"\n)' at line 1, column 1 - line 5, column 2"
|
||||
"summary": "Deleted 'import (\n\"net/http\"\n . \"some/dsl\"\n alias \"some/package\"\n)' at line 4, column 1 - line 8, column 2 in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -668,25 +344,26 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
|
||||
"index 62facc6..e2f9293 100644",
|
||||
"index b544dded..79058077 100644",
|
||||
"--- a/grouped-import-declarations.go",
|
||||
"+++ b/grouped-import-declarations.go",
|
||||
"@@ -1,9 +1,4 @@",
|
||||
" import (",
|
||||
"@@ -1,9 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-import (",
|
||||
"-\"net/http\"",
|
||||
"- . \"some/dsl\"",
|
||||
"- alias \"some/package\"",
|
||||
"-)",
|
||||
"-import (",
|
||||
" \"net/socket\"",
|
||||
" . \"types/dsl\"",
|
||||
" alias \"awesome/package\""
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "5ea9646b5663b469d1d05d122fc573b0bbf249b6..03ae54522feab408ae78aabc67aa66fb1bbd9e5d"
|
||||
"shas": "de107f343c5ef74a0ffff791e8b1f0a277065bd1..81ec082bb841b347028b400c179a10de3b443f10"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-grouped-import-declarations-delete-rest-test",
|
||||
"testCaseDescription": "go-grouped-import-declarations-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"grouped-import-declarations.go": [
|
||||
@ -698,65 +375,32 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the \"net/socket\" import statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the \"types/dsl\" import statement"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {
|
||||
"grouped-import-declarations.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'import (\n\"net/socket\"\n . \"types/dsl\"\n alias \"awesome/package\"\n)' at line 1, column 1 - line 5, column 2"
|
||||
}
|
||||
]
|
||||
}
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"grouped-import-declarations.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
|
||||
"index e2f9293..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/grouped-import-declarations.go",
|
||||
"+++ b/grouped-import-declarations.go",
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-import (",
|
||||
"-\"net/socket\"",
|
||||
"- . \"types/dsl\"",
|
||||
"- alias \"awesome/package\"",
|
||||
"-)"
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "03ae54522feab408ae78aabc67aa66fb1bbd9e5d..f506441da93c9b84b48df54338a1c9a9314a3f6b"
|
||||
"shas": "81ec082bb841b347028b400c179a10de3b443f10..35a378ca062939544c7a2fbd82b9ed4962db60d0"
|
||||
}]
|
||||
|
@ -1,94 +1,50 @@
|
||||
[{
|
||||
"testCaseDescription": "go-grouped-var-declarations-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"grouped-var-declarations.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"grouped-var-declarations.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/grouped-var-declarations.go",
|
||||
"+++ b/grouped-var-declarations.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "784a2032a8b3f1926b4874446b0dc9672ace15be..23198d8d7b54c07e1f3ebcb5cca172d62d75e934"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-grouped-var-declarations-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"grouped-var-declarations.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'zero' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'one' variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"grouped-var-declarations.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
|
||||
"index e69de29..c1c0b16 100644",
|
||||
"--- a/grouped-var-declarations.go",
|
||||
"+++ b/grouped-var-declarations.go",
|
||||
"@@ -0,0 +1,4 @@",
|
||||
"+var (",
|
||||
"+zero = 0",
|
||||
"+one = 1",
|
||||
"+)"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "87119afd9d847041735cf640ecc066ad2804a85f..3d2221718774634aaf05f9751f1eac96639c8867"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-grouped-var-declarations-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"grouped-var-declarations.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
@ -97,27 +53,27 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
5,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'zero' variable"
|
||||
"summary": "Added the 'zero' var assignment in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
5,
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
6,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'one' variable"
|
||||
"summary": "Added the 'one' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -128,109 +84,22 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
|
||||
"index c1c0b16..6b9c91d 100644",
|
||||
"index 79058077..cdb45b39 100644",
|
||||
"--- a/grouped-var-declarations.go",
|
||||
"+++ b/grouped-var-declarations.go",
|
||||
"@@ -1,4 +1,12 @@",
|
||||
" var (",
|
||||
"+a = 0",
|
||||
"+b = 1",
|
||||
"+)",
|
||||
"@@ -1,5 +1,8 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+var (",
|
||||
"+zero = 0",
|
||||
"+one = 1",
|
||||
"+)",
|
||||
"+var (",
|
||||
" zero = 0",
|
||||
" one = 1",
|
||||
" )"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "3d2221718774634aaf05f9751f1eac96639c8867..028abd80df67d44f7cd18c889e31248c955453ae"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-grouped-var-declarations-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"grouped-var-declarations.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
2
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'a' identifier with the 'zero' identifier in the zero variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
2
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
4
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'b' identifier with the 'one' identifier in the one variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"grouped-var-declarations.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
|
||||
"index 6b9c91d..5ed0e06 100644",
|
||||
"--- a/grouped-var-declarations.go",
|
||||
"+++ b/grouped-var-declarations.go",
|
||||
"@@ -1,6 +1,6 @@",
|
||||
" var (",
|
||||
"-a = 0",
|
||||
"-b = 1",
|
||||
"+zero = 0",
|
||||
"+one = 1",
|
||||
" )",
|
||||
" var (",
|
||||
" zero = 0"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "028abd80df67d44f7cd18c889e31248c955453ae..25b8fae28eebfaaa5e88a04d68b10205a277ed91"
|
||||
"shas": "23198d8d7b54c07e1f3ebcb5cca172d62d75e934..1fdf3278a33b044ce8f71f7c081767f244b6ac04"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-grouped-var-declarations-replacement-test",
|
||||
@ -242,54 +111,54 @@
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'zero' identifier with the 'a' identifier in the a variable"
|
||||
"summary": "Replaced the 'zero' identifier with the 'a' identifier in the a var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
6,
|
||||
4
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
6,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'one' identifier with the 'b' identifier in the b variable"
|
||||
"summary": "Replaced the 'one' identifier with the 'b' identifier in the b var assignment of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -300,21 +169,22 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
|
||||
"index 5ed0e06..6b9c91d 100644",
|
||||
"index cdb45b39..806a5935 100644",
|
||||
"--- a/grouped-var-declarations.go",
|
||||
"+++ b/grouped-var-declarations.go",
|
||||
"@@ -1,6 +1,6 @@",
|
||||
"@@ -2,7 +2,7 @@ package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
" var (",
|
||||
"-zero = 0",
|
||||
"-one = 1",
|
||||
"+a = 0",
|
||||
"+b = 1",
|
||||
" )",
|
||||
" var (",
|
||||
" zero = 0"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "25b8fae28eebfaaa5e88a04d68b10205a277ed91..34a449a972a1a710b5cd14ca0c174c15dcaeb003"
|
||||
"shas": "1fdf3278a33b044ce8f71f7c081767f244b6ac04..b4aed6bf12bb1f171ed58e6b082645e4cd0aeae9"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-grouped-var-declarations-delete-replacement-test",
|
||||
@ -323,93 +193,57 @@
|
||||
"grouped-var-declarations.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
2
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'a' variable"
|
||||
"summary": "Replaced the 'a' identifier with the 'zero' identifier in the zero var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
2
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
4
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'b' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'zero' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'one' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' variable"
|
||||
"summary": "Replaced the 'b' identifier with the 'one' identifier in the one var assignment of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -420,30 +254,25 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
|
||||
"index 6b9c91d..9094e82 100644",
|
||||
"index 806a5935..cdb45b39 100644",
|
||||
"--- a/grouped-var-declarations.go",
|
||||
"+++ b/grouped-var-declarations.go",
|
||||
"@@ -1,12 +1,8 @@",
|
||||
"@@ -2,7 +2,7 @@ package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
" var (",
|
||||
"-a = 0",
|
||||
"-b = 1",
|
||||
"-)",
|
||||
"-var (",
|
||||
" zero = 0",
|
||||
" one = 1",
|
||||
"+zero = 0",
|
||||
"+one = 1",
|
||||
" )",
|
||||
" var (",
|
||||
"-zero = 0",
|
||||
"-one = 1",
|
||||
"+a = 0",
|
||||
"+b = 1",
|
||||
" )"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "34a449a972a1a710b5cd14ca0c174c15dcaeb003..513b36b7a4797c5c95576f1bdcfe5c3aff699138"
|
||||
"shas": "b4aed6bf12bb1f171ed58e6b082645e4cd0aeae9..9a29fa861e06cb7e02d16e7ab8fcd66de3c2f825"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-grouped-var-declarations-delete-test",
|
||||
"testCaseDescription": "go-grouped-var-declarations-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"grouped-var-declarations.go": [
|
||||
@ -451,31 +280,31 @@
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
5,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'zero' variable"
|
||||
"summary": "Deleted the 'zero' var assignment in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
6,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'one' variable"
|
||||
"summary": "Deleted the 'one' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -486,24 +315,25 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
|
||||
"index 9094e82..d954576 100644",
|
||||
"index cdb45b39..79058077 100644",
|
||||
"--- a/grouped-var-declarations.go",
|
||||
"+++ b/grouped-var-declarations.go",
|
||||
"@@ -1,8 +1,4 @@",
|
||||
" var (",
|
||||
"@@ -1,8 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-var (",
|
||||
"-zero = 0",
|
||||
"-one = 1",
|
||||
"-)",
|
||||
"-var (",
|
||||
" a = 0",
|
||||
" b = 1",
|
||||
" )"
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "513b36b7a4797c5c95576f1bdcfe5c3aff699138..b9336abbeeb3b7e8e18bd0757837c28f3d1b41e1"
|
||||
"shas": "9a29fa861e06cb7e02d16e7ab8fcd66de3c2f825..ace9280be87d31336c3425f6e703c009840e7cfc"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-grouped-var-declarations-delete-rest-test",
|
||||
"testCaseDescription": "go-grouped-var-declarations-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"grouped-var-declarations.go": [
|
||||
@ -515,27 +345,12 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b' variable"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -546,15 +361,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
|
||||
"index d954576..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/grouped-var-declarations.go",
|
||||
"+++ b/grouped-var-declarations.go",
|
||||
"@@ -1,4 +0,0 @@",
|
||||
"-var (",
|
||||
"-a = 0",
|
||||
"-b = 1",
|
||||
"-)"
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "b9336abbeeb3b7e8e18bd0757837c28f3d1b41e1..25238a93bb3b92d4e2609c44f320e44fd9f4b537"
|
||||
"shas": "ace9280be87d31336c3425f6e703c009840e7cfc..f5fe5786c0b546d3a5a224d7b5875f31f57db459"
|
||||
}]
|
||||
|
@ -1,23 +1,50 @@
|
||||
[{
|
||||
"testCaseDescription": "go-if-statements-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"if-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"if-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/if-statements.go b/if-statements.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/if-statements.go",
|
||||
"+++ b/if-statements.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "67b21ca4a0eade527376ad1395eb7fd5fc5bea97..44348782059614a329e455e4c93a15380953b35d"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-if-statements-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"if-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a()' if statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
@ -31,7 +58,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a := b(); c' if statement"
|
||||
"summary": "Added the 'a()' if statement in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
@ -41,96 +68,18 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
11,
|
||||
9,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a()' if statement"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"if-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/if-statements.go b/if-statements.go",
|
||||
"index e69de29..2266b8b 100644",
|
||||
"--- a/if-statements.go",
|
||||
"+++ b/if-statements.go",
|
||||
"@@ -0,0 +1,11 @@",
|
||||
"+if a() {",
|
||||
"+b()",
|
||||
"+}",
|
||||
"+if a := b(); c {",
|
||||
"+d()",
|
||||
"+}",
|
||||
"+if a() {",
|
||||
"+b()",
|
||||
"+} else {",
|
||||
"+c()",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "4f9b8528a927a98cae35aa92a05bab432d2cf451..75f23c99193596d8ea69b9866cd03216408717d4"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-if-statements-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"if-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'x()' if statement"
|
||||
"summary": "Added the 'a := b(); c' if statement in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'y := b(); c' if statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
7,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
11,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'z()' if statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
12,
|
||||
10,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
@ -139,37 +88,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a()' if statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
15,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
17,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a := b(); c' if statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
18,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
22,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a()' if statement"
|
||||
"summary": "Added the 'a()' if statement in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -180,21 +99,14 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/if-statements.go b/if-statements.go",
|
||||
"index 2266b8b..abacd6e 100644",
|
||||
"index 79058077..76a6f335 100644",
|
||||
"--- a/if-statements.go",
|
||||
"+++ b/if-statements.go",
|
||||
"@@ -1,3 +1,25 @@",
|
||||
"+if x() {",
|
||||
"+b()",
|
||||
"+}",
|
||||
"+if y := b(); c {",
|
||||
"+d()",
|
||||
"+}",
|
||||
"+if z() {",
|
||||
"+b()",
|
||||
"+} else {",
|
||||
"+c()",
|
||||
"+}",
|
||||
"@@ -1,5 +1,15 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+if a() {",
|
||||
"+b()",
|
||||
"+}",
|
||||
@ -206,161 +118,16 @@
|
||||
"+} else {",
|
||||
"+c()",
|
||||
"+}",
|
||||
" if a() {",
|
||||
" b()",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "75f23c99193596d8ea69b9866cd03216408717d4..669deded061b62b8d693268ec8535244bc3aeed8"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-if-statements-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"if-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'x' identifier with the 'a' identifier in the a() function call"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'y' identifier with the 'a' identifier in the a variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
7,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
7,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'z' identifier with the 'a' identifier in the a() function call"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"if-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/if-statements.go b/if-statements.go",
|
||||
"index abacd6e..b5fd21a 100644",
|
||||
"--- a/if-statements.go",
|
||||
"+++ b/if-statements.go",
|
||||
"@@ -1,10 +1,10 @@",
|
||||
"-if x() {",
|
||||
"+if a() {",
|
||||
" b()",
|
||||
" }",
|
||||
"-if y := b(); c {",
|
||||
"+if a := b(); c {",
|
||||
" d()",
|
||||
" }",
|
||||
"-if z() {",
|
||||
"+if a() {",
|
||||
" b()",
|
||||
" } else {",
|
||||
" c()"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "669deded061b62b8d693268ec8535244bc3aeed8..0ab3ed7afc3476fc761770f35bf7697971a2f839"
|
||||
"shas": "44348782059614a329e455e4c93a15380953b35d..15dfc6156abddf36067e347cc9960195349a924a"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-if-statements-replacement-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"if-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'a' identifier with the 'x' identifier in the x() function call"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
@ -386,7 +153,7 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'a' identifier with the 'y' identifier in the y variable"
|
||||
"summary": "Replaced the 'a' identifier with the 'x' identifier in the x() function call of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
@ -413,7 +180,34 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'a' identifier with the 'z' identifier in the z() function call"
|
||||
"summary": "Replaced the 'a' identifier with the 'y' identifier in the y var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
10,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
10,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'a' identifier with the 'z' identifier in the z() function call of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -424,10 +218,13 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/if-statements.go b/if-statements.go",
|
||||
"index b5fd21a..abacd6e 100644",
|
||||
"index 76a6f335..39dfc0da 100644",
|
||||
"--- a/if-statements.go",
|
||||
"+++ b/if-statements.go",
|
||||
"@@ -1,10 +1,10 @@",
|
||||
"@@ -1,13 +1,13 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-if a() {",
|
||||
"+if x() {",
|
||||
" b()",
|
||||
@ -443,7 +240,7 @@
|
||||
" c()"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "0ab3ed7afc3476fc761770f35bf7697971a2f839..2f24dc9616440294210032ea90d1869e7b39cc8c"
|
||||
"shas": "15dfc6156abddf36067e347cc9960195349a924a..63f6cb996de5cab0b4c0b6c6d69d26ce44e595df"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-if-statements-delete-replacement-test",
|
||||
@ -452,138 +249,84 @@
|
||||
"if-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
2
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'x()' if statement"
|
||||
"summary": "Replaced the 'x' identifier with the 'a' identifier in the a() function call of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
2
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
7,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
7,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'y := b(); c' if statement"
|
||||
"summary": "Replaced the 'y' identifier with the 'a' identifier in the a var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
7,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
11,
|
||||
2
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
10,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
10,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'z()' if statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
12,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
14,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a()' if statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
15,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
17,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a := b(); c' if statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
18,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
22,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a()' if statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
12,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
14,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'x()' if statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
15,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
17,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'y := b(); c' if statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
18,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
22,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'z()' if statement"
|
||||
"summary": "Replaced the 'z' identifier with the 'a' identifier in the a() function call of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -594,65 +337,35 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/if-statements.go b/if-statements.go",
|
||||
"index abacd6e..ccb09fd 100644",
|
||||
"index 39dfc0da..76a6f335 100644",
|
||||
"--- a/if-statements.go",
|
||||
"+++ b/if-statements.go",
|
||||
"@@ -1,14 +1,3 @@",
|
||||
"@@ -1,13 +1,13 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-if x() {",
|
||||
"-b()",
|
||||
"-}",
|
||||
"+if a() {",
|
||||
" b()",
|
||||
" }",
|
||||
"-if y := b(); c {",
|
||||
"-d()",
|
||||
"-}",
|
||||
"-if z() {",
|
||||
"-b()",
|
||||
"-} else {",
|
||||
"-c()",
|
||||
"-}",
|
||||
" if a() {",
|
||||
" b()",
|
||||
" }",
|
||||
"@@ -20,13 +9,13 @@ b()",
|
||||
" } else {",
|
||||
" c()",
|
||||
" }",
|
||||
"-if a() {",
|
||||
"+if x() {",
|
||||
" b()",
|
||||
" }",
|
||||
"-if a := b(); c {",
|
||||
"+if y := b(); c {",
|
||||
"+if a := b(); c {",
|
||||
" d()",
|
||||
" }",
|
||||
"-if a() {",
|
||||
"+if z() {",
|
||||
"-if z() {",
|
||||
"+if a() {",
|
||||
" b()",
|
||||
" } else {",
|
||||
" c()"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "2f24dc9616440294210032ea90d1869e7b39cc8c..dd27d3e8d9917d7970125a0e771840a3a352768d"
|
||||
"shas": "63f6cb996de5cab0b4c0b6c6d69d26ce44e595df..1a40ce7a1e45f7ef87ccf0a8a59eaeffaa51a1a5"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-if-statements-delete-test",
|
||||
"testCaseDescription": "go-if-statements-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"if-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a()' if statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
@ -666,7 +379,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a := b(); c' if statement"
|
||||
"summary": "Deleted the 'a()' if statement in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
@ -676,12 +389,27 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
11,
|
||||
9,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a()' if statement"
|
||||
"summary": "Deleted the 'a := b(); c' if statement in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
10,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
14,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a()' if statement in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -692,10 +420,13 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/if-statements.go b/if-statements.go",
|
||||
"index ccb09fd..2e63573 100644",
|
||||
"index 76a6f335..79058077 100644",
|
||||
"--- a/if-statements.go",
|
||||
"+++ b/if-statements.go",
|
||||
"@@ -1,14 +1,3 @@",
|
||||
"@@ -1,15 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-if a() {",
|
||||
"-b()",
|
||||
"-}",
|
||||
@ -707,15 +438,14 @@
|
||||
"-} else {",
|
||||
"-c()",
|
||||
"-}",
|
||||
" if x() {",
|
||||
" b()",
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "dd27d3e8d9917d7970125a0e771840a3a352768d..1559b8975147717c1d7eb9ae330d6bd4dbc18702"
|
||||
"shas": "1a40ce7a1e45f7ef87ccf0a8a59eaeffaa51a1a5..d4ef05cad7067ddfd19a4b4fc0576226d9adaa5d"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-if-statements-delete-rest-test",
|
||||
"testCaseDescription": "go-if-statements-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"if-statements.go": [
|
||||
@ -726,43 +456,13 @@
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'x()' if statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'y := b(); c' if statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
7,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
11,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'z()' if statement"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -773,22 +473,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/if-statements.go b/if-statements.go",
|
||||
"index 2e63573..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/if-statements.go",
|
||||
"+++ b/if-statements.go",
|
||||
"@@ -1,11 +0,0 @@",
|
||||
"-if x() {",
|
||||
"-b()",
|
||||
"-}",
|
||||
"-if y := b(); c {",
|
||||
"-d()",
|
||||
"-}",
|
||||
"-if z() {",
|
||||
"-b()",
|
||||
"-} else {",
|
||||
"-c()",
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "1559b8975147717c1d7eb9ae330d6bd4dbc18702..d77b70cb3981afaf807f3e56652ecd386101cb2b"
|
||||
"shas": "d4ef05cad7067ddfd19a4b4fc0576226d9adaa5d..6ccea258bd2125cbbe34266069b39fc47fe5d4e3"
|
||||
}]
|
||||
|
@ -1,94 +1,50 @@
|
||||
[{
|
||||
"testCaseDescription": "go-imaginary-literals-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"imaginary-literals.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"imaginary-literals.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/imaginary-literals.go",
|
||||
"+++ b/imaginary-literals.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "3a475c2e781c97178d1986bf754545dbb051440c..60f0ccdaef54bc0e05404d360648e0588d257a91"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-imaginary-literals-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"imaginary-literals.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"imaginary-literals.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
||||
"index e69de29..aca2d55 100644",
|
||||
"--- a/imaginary-literals.go",
|
||||
"+++ b/imaginary-literals.go",
|
||||
"@@ -0,0 +1,4 @@",
|
||||
"+const (",
|
||||
"+a = 01i",
|
||||
"+b = 1.e+100i",
|
||||
"+)"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "9fd880a1842d8c0b0096899be831486a006f50e4..1dfc4de50a79b596b883a8c32478aed48332a96b"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-imaginary-literals-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"imaginary-literals.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
@ -97,27 +53,27 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
5,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' variable"
|
||||
"summary": "Added the 'a' var assignment in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
5,
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
6,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' variable"
|
||||
"summary": "Added the 'b' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -128,109 +84,22 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
||||
"index aca2d55..6983988 100644",
|
||||
"index 79058077..25a97daf 100644",
|
||||
"--- a/imaginary-literals.go",
|
||||
"+++ b/imaginary-literals.go",
|
||||
"@@ -1,4 +1,12 @@",
|
||||
" const (",
|
||||
"+a = 02i",
|
||||
"+b = 1.e+103i",
|
||||
"+)",
|
||||
"@@ -1,5 +1,8 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+const (",
|
||||
"+a = 01i",
|
||||
"+b = 1.e+100i",
|
||||
"+)",
|
||||
"+const (",
|
||||
" a = 01i",
|
||||
" b = 1.e+100i",
|
||||
" )"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "1dfc4de50a79b596b883a8c32478aed48332a96b..22a5dcc7eb910c4be07e0d79c4010014c87b9a45"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-imaginary-literals-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"imaginary-literals.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
8
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
8
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the '02i' imaginary_literal with the '01i' imaginary_literal in the a variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
13
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
13
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the '1.e+103i' imaginary_literal with the '1.e+100i' imaginary_literal in the b variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"imaginary-literals.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
||||
"index 6983988..a7e36a5 100644",
|
||||
"--- a/imaginary-literals.go",
|
||||
"+++ b/imaginary-literals.go",
|
||||
"@@ -1,6 +1,6 @@",
|
||||
" const (",
|
||||
"-a = 02i",
|
||||
"-b = 1.e+103i",
|
||||
"+a = 01i",
|
||||
"+b = 1.e+100i",
|
||||
" )",
|
||||
" const (",
|
||||
" a = 01i"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "22a5dcc7eb910c4be07e0d79c4010014c87b9a45..c8e821fccc1a9384008640b22a57896832df548d"
|
||||
"shas": "60f0ccdaef54bc0e05404d360648e0588d257a91..58218e7b9abee0cf80f6a9e0b2e2f2a98f94e492"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-imaginary-literals-replacement-test",
|
||||
@ -242,54 +111,54 @@
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
8
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
8
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the '01i' imaginary_literal with the '02i' imaginary_literal in the a variable"
|
||||
"summary": "Replaced the '01i' imaginary_literal with the '02i' imaginary_literal in the a var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
6,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
6,
|
||||
13
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
6,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
6,
|
||||
13
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the '1.e+100i' imaginary_literal with the '1.e+103i' imaginary_literal in the b variable"
|
||||
"summary": "Replaced the '1.e+100i' imaginary_literal with the '1.e+103i' imaginary_literal in the b var assignment of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -300,21 +169,22 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
||||
"index a7e36a5..6983988 100644",
|
||||
"index 25a97daf..151a5338 100644",
|
||||
"--- a/imaginary-literals.go",
|
||||
"+++ b/imaginary-literals.go",
|
||||
"@@ -1,6 +1,6 @@",
|
||||
"@@ -2,7 +2,7 @@ package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
" const (",
|
||||
"-a = 01i",
|
||||
"-b = 1.e+100i",
|
||||
"+a = 02i",
|
||||
"+b = 1.e+103i",
|
||||
" )",
|
||||
" const (",
|
||||
" a = 01i"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "c8e821fccc1a9384008640b22a57896832df548d..d7c0cbbf7c636589fb8707bd044efc2a9c74ac77"
|
||||
"shas": "58218e7b9abee0cf80f6a9e0b2e2f2a98f94e492..704fd72c32fffccaecb8ff6ca11b809782f39ba0"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-imaginary-literals-delete-replacement-test",
|
||||
@ -323,93 +193,57 @@
|
||||
"imaginary-literals.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
8
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
8
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'a' variable"
|
||||
"summary": "Replaced the '02i' imaginary_literal with the '01i' imaginary_literal in the a var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
13
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
13
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'b' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' variable"
|
||||
"summary": "Replaced the '1.e+103i' imaginary_literal with the '1.e+100i' imaginary_literal in the b var assignment of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -420,30 +254,25 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
||||
"index 6983988..02cff8d 100644",
|
||||
"index 151a5338..25a97daf 100644",
|
||||
"--- a/imaginary-literals.go",
|
||||
"+++ b/imaginary-literals.go",
|
||||
"@@ -1,12 +1,8 @@",
|
||||
"@@ -2,7 +2,7 @@ package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
" const (",
|
||||
"-a = 02i",
|
||||
"-b = 1.e+103i",
|
||||
"-)",
|
||||
"-const (",
|
||||
" a = 01i",
|
||||
" b = 1.e+100i",
|
||||
"+a = 01i",
|
||||
"+b = 1.e+100i",
|
||||
" )",
|
||||
" const (",
|
||||
"-a = 01i",
|
||||
"-b = 1.e+100i",
|
||||
"+a = 02i",
|
||||
"+b = 1.e+103i",
|
||||
" )"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "d7c0cbbf7c636589fb8707bd044efc2a9c74ac77..693f96d6dd713a80868ba814289fcf23a9542611"
|
||||
"shas": "704fd72c32fffccaecb8ff6ca11b809782f39ba0..af8ba14e709eb94413834b2e03a1dd5508cff999"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-imaginary-literals-delete-test",
|
||||
"testCaseDescription": "go-imaginary-literals-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"imaginary-literals.go": [
|
||||
@ -451,31 +280,31 @@
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
5,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a' variable"
|
||||
"summary": "Deleted the 'a' var assignment in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
6,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b' variable"
|
||||
"summary": "Deleted the 'b' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -486,24 +315,25 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
||||
"index 02cff8d..6d8ec55 100644",
|
||||
"index 25a97daf..79058077 100644",
|
||||
"--- a/imaginary-literals.go",
|
||||
"+++ b/imaginary-literals.go",
|
||||
"@@ -1,8 +1,4 @@",
|
||||
" const (",
|
||||
"@@ -1,8 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-const (",
|
||||
"-a = 01i",
|
||||
"-b = 1.e+100i",
|
||||
"-)",
|
||||
"-const (",
|
||||
" a = 02i",
|
||||
" b = 1.e+103i",
|
||||
" )"
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "693f96d6dd713a80868ba814289fcf23a9542611..ea50813182b228c1202b76c8c102a8156732e30a"
|
||||
"shas": "af8ba14e709eb94413834b2e03a1dd5508cff999..3d14efd12e0c51ea5f90f6237364665c745de057"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-imaginary-literals-delete-rest-test",
|
||||
"testCaseDescription": "go-imaginary-literals-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"imaginary-literals.go": [
|
||||
@ -515,27 +345,12 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b' variable"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -546,15 +361,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
||||
"index 6d8ec55..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/imaginary-literals.go",
|
||||
"+++ b/imaginary-literals.go",
|
||||
"@@ -1,4 +0,0 @@",
|
||||
"-const (",
|
||||
"-a = 02i",
|
||||
"-b = 1.e+103i",
|
||||
"-)"
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "ea50813182b228c1202b76c8c102a8156732e30a..740c6c6b1390c86d2f179d9d31f010916292861a"
|
||||
"shas": "3d14efd12e0c51ea5f90f6237364665c745de057..29b7d780794e2ee8d37771310cebb2000b677aec"
|
||||
}]
|
||||
|
@ -1,4 +1,46 @@
|
||||
[{
|
||||
"testCaseDescription": "go-increment-decrement-statements-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"increment-decrement-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"increment-decrement-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/increment-decrement-statements.go",
|
||||
"+++ b/increment-decrement-statements.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "7f8d4e43555f3b5d3f723b58c0fbf874612c614f..aa4d66200c9a9aa7faf6a95a5409a8ffd4adfdd3"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-increment-decrement-statements-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
@ -7,115 +49,31 @@
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'i' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'j' identifier"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"increment-decrement-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
|
||||
"index e69de29..c118f41 100644",
|
||||
"--- a/increment-decrement-statements.go",
|
||||
"+++ b/increment-decrement-statements.go",
|
||||
"@@ -0,0 +1,2 @@",
|
||||
"+i++",
|
||||
"+j--"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "927f995f9a27002e1694b5d3ce66a7dbbfda6720..08e1c1af15a7a2e6b3905900905a1fd79d6f1c43"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-increment-decrement-statements-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"increment-decrement-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
4
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'foo' identifier"
|
||||
"summary": "Added the 'i++' increment statement in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
2
|
||||
5,
|
||||
4
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'x' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'i' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'j' identifier"
|
||||
"summary": "Added the 'j--' decrement statement in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -126,105 +84,20 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
|
||||
"index c118f41..d617bc4 100644",
|
||||
"index 79058077..18bf03a2 100644",
|
||||
"--- a/increment-decrement-statements.go",
|
||||
"+++ b/increment-decrement-statements.go",
|
||||
"@@ -1,2 +1,6 @@",
|
||||
"+foo++",
|
||||
"+x++",
|
||||
"@@ -1,5 +1,6 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+i++",
|
||||
"+j--",
|
||||
" i++",
|
||||
" j--"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "08e1c1af15a7a2e6b3905900905a1fd79d6f1c43..ce7abe0a0dbc3a4f0c453bba572432d0ed745d36"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-increment-decrement-statements-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"increment-decrement-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'foo' identifier with the 'i' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'j' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'x' identifier"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"increment-decrement-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
|
||||
"index d617bc4..15214d0 100644",
|
||||
"--- a/increment-decrement-statements.go",
|
||||
"+++ b/increment-decrement-statements.go",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
"-foo++",
|
||||
"-x++",
|
||||
"+i++",
|
||||
"+j--",
|
||||
" i++",
|
||||
" j--",
|
||||
" i++"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "ce7abe0a0dbc3a4f0c453bba572432d0ed745d36..0fd355f46a4c9aec73e9874645e7a89d920e58e3"
|
||||
"shas": "aa4d66200c9a9aa7faf6a95a5409a8ffd4adfdd3..7486326aeb5e953caf6a177f94fe81f873dd3f82"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-increment-decrement-statements-replacement-test",
|
||||
@ -236,57 +109,57 @@
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
2
|
||||
4,
|
||||
4
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4
|
||||
4,
|
||||
6
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'i' identifier with the 'foo' identifier"
|
||||
"summary": "Replaced the 'i++' increment statement with the 'foo++' increment statement in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
2
|
||||
5,
|
||||
4
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'x' identifier"
|
||||
"summary": "Added the 'x++' increment statement in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
2
|
||||
5,
|
||||
4
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'j' identifier"
|
||||
"summary": "Deleted the 'j--' decrement statement in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -297,20 +170,21 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
|
||||
"index 15214d0..d617bc4 100644",
|
||||
"index 18bf03a2..08611ad4 100644",
|
||||
"--- a/increment-decrement-statements.go",
|
||||
"+++ b/increment-decrement-statements.go",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
"@@ -1,6 +1,6 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-i++",
|
||||
"-j--",
|
||||
"+foo++",
|
||||
"+x++",
|
||||
" i++",
|
||||
" j--",
|
||||
" i++"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "0fd355f46a4c9aec73e9874645e7a89d920e58e3..628555688b52d8b03b5a7efa9fd07954f93c04fd"
|
||||
"shas": "7486326aeb5e953caf6a177f94fe81f873dd3f82..815af0d4d7514f7e49a17dfcfc7cc7d7e2037117"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-increment-decrement-statements-delete-replacement-test",
|
||||
@ -319,93 +193,60 @@
|
||||
"increment-decrement-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
6
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
4
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'foo' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'x' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'i' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'j' identifier"
|
||||
"summary": "Replaced the 'foo++' increment statement with the 'i++' increment statement in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
5,
|
||||
4
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'foo' identifier"
|
||||
"summary": "Added the 'j--' decrement statement in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
5,
|
||||
4
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'x' identifier"
|
||||
"summary": "Deleted the 'x++' increment statement in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -416,24 +257,24 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
|
||||
"index d617bc4..640bbf1 100644",
|
||||
"index 08611ad4..18bf03a2 100644",
|
||||
"--- a/increment-decrement-statements.go",
|
||||
"+++ b/increment-decrement-statements.go",
|
||||
"@@ -1,6 +1,4 @@",
|
||||
"@@ -1,6 +1,6 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-foo++",
|
||||
"-x++",
|
||||
"-i++",
|
||||
"-j--",
|
||||
" i++",
|
||||
" j--",
|
||||
"+foo++",
|
||||
"+x++"
|
||||
"+i++",
|
||||
"+j--",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "628555688b52d8b03b5a7efa9fd07954f93c04fd..4df0db28123dab35f85c9f8c5f3f6045a9913354"
|
||||
"shas": "815af0d4d7514f7e49a17dfcfc7cc7d7e2037117..89228c00eab271cd2f80899a63562fc9393d59dc"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-increment-decrement-statements-delete-test",
|
||||
"testCaseDescription": "go-increment-decrement-statements-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"increment-decrement-statements.go": [
|
||||
@ -441,87 +282,31 @@
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'i' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'j' identifier"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"increment-decrement-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
|
||||
"index 640bbf1..b7c351d 100644",
|
||||
"--- a/increment-decrement-statements.go",
|
||||
"+++ b/increment-decrement-statements.go",
|
||||
"@@ -1,4 +1,2 @@",
|
||||
"-i++",
|
||||
"-j--",
|
||||
" foo++",
|
||||
" x++"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "4df0db28123dab35f85c9f8c5f3f6045a9913354..f328fdb9b4ab03a8667cbcafaaf2ef18c667ac57"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-increment-decrement-statements-delete-rest-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"increment-decrement-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
4
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'foo' identifier"
|
||||
"summary": "Deleted the 'i++' increment statement in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
2
|
||||
5,
|
||||
4
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'x' identifier"
|
||||
"summary": "Deleted the 'j--' decrement statement in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -532,13 +317,60 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
|
||||
"index b7c351d..e69de29 100644",
|
||||
"index 18bf03a2..79058077 100644",
|
||||
"--- a/increment-decrement-statements.go",
|
||||
"+++ b/increment-decrement-statements.go",
|
||||
"@@ -1,2 +0,0 @@",
|
||||
"-foo++",
|
||||
"-x++"
|
||||
"@@ -1,6 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-i++",
|
||||
"-j--",
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "f328fdb9b4ab03a8667cbcafaaf2ef18c667ac57..a5b8a6804181af3a1387f9a23e3f85c44ddb6082"
|
||||
"shas": "89228c00eab271cd2f80899a63562fc9393d59dc..65de8108663b2ceeaa6c6e5d491ad1c4cb6dc8f6"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-increment-decrement-statements-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"increment-decrement-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"increment-decrement-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/increment-decrement-statements.go",
|
||||
"+++ b/increment-decrement-statements.go",
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "65de8108663b2ceeaa6c6e5d491ad1c4cb6dc8f6..96a2caf2b396eb1844dfd668cb913452ae09c4a6"
|
||||
}]
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,46 @@
|
||||
[{
|
||||
"testCaseDescription": "go-label-statements-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"label-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"label-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/label-statements.go b/label-statements.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/label-statements.go",
|
||||
"+++ b/label-statements.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "f9136e3be46a93bc0e0b6dc467c7b9ced1b97894..d7212f336c9c60b14c59e8e94e1ecd4aede3cc09"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-label-statements-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
@ -7,16 +49,16 @@
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
3
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
15
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'insert_label' identifier"
|
||||
"summary": "Added the 'insert_label' identifier in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -27,132 +69,21 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/label-statements.go b/label-statements.go",
|
||||
"index e69de29..d0544fe 100644",
|
||||
"index 79058077..b0a29697 100644",
|
||||
"--- a/label-statements.go",
|
||||
"+++ b/label-statements.go",
|
||||
"@@ -0,0 +1,3 @@",
|
||||
"+{",
|
||||
"+ insert_label:",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "13fa148e00739eba43f10562e024e15d2fc7e5d9..ec940835e3aadb604515bf67c883ca6521cb2d08"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-label-statements-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"label-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
3
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
20
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'replacement_label' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
5,
|
||||
3
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
15
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'insert_label' identifier"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"label-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/label-statements.go b/label-statements.go",
|
||||
"index d0544fe..745311d 100644",
|
||||
"--- a/label-statements.go",
|
||||
"+++ b/label-statements.go",
|
||||
"@@ -1,3 +1,9 @@",
|
||||
" {",
|
||||
"+ replacement_label:",
|
||||
"+}",
|
||||
"@@ -1,5 +1,7 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+{",
|
||||
"+ insert_label:",
|
||||
"+}",
|
||||
"+{",
|
||||
" insert_label:",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "ec940835e3aadb604515bf67c883ca6521cb2d08..5e455b8924d22fe892b8bab4970fc6524c4deefc"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-label-statements-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"label-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
3
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
20
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
3
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
15
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'replacement_label' identifier with the 'insert_label' identifier"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"label-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/label-statements.go b/label-statements.go",
|
||||
"index 745311d..be34b5c 100644",
|
||||
"--- a/label-statements.go",
|
||||
"+++ b/label-statements.go",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" {",
|
||||
"- replacement_label:",
|
||||
"+ insert_label:",
|
||||
" }",
|
||||
" {",
|
||||
" insert_label:"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "5e455b8924d22fe892b8bab4970fc6524c4deefc..8a5a495c2571e6547c42e532abcb5a9f3aec4024"
|
||||
"shas": "d7212f336c9c60b14c59e8e94e1ecd4aede3cc09..0f74fcb7d75eeebfc2e1a28388fa94535683467b"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-label-statements-replacement-test",
|
||||
@ -164,27 +95,27 @@
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
3
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
15
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
3
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
20
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'insert_label' identifier with the 'replacement_label' identifier"
|
||||
"summary": "Replaced the 'insert_label' identifier with the 'replacement_label' identifier in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -195,19 +126,20 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/label-statements.go b/label-statements.go",
|
||||
"index be34b5c..745311d 100644",
|
||||
"index b0a29697..3d3cf164 100644",
|
||||
"--- a/label-statements.go",
|
||||
"+++ b/label-statements.go",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
"@@ -2,6 +2,6 @@ package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
" {",
|
||||
"- insert_label:",
|
||||
"+ replacement_label:",
|
||||
" }",
|
||||
" {",
|
||||
" insert_label:"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "8a5a495c2571e6547c42e532abcb5a9f3aec4024..22c8014919ec0c0808de5aad53da258e151ed475"
|
||||
"shas": "0f74fcb7d75eeebfc2e1a28388fa94535683467b..a34375d5b52b45a8d48f0540b89d62710a4c6be1"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-label-statements-delete-replacement-test",
|
||||
@ -216,48 +148,30 @@
|
||||
"label-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
3
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
20
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
3
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
20
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
3
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
15
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'replacement_label' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
5,
|
||||
3
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
15
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'insert_label' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
5,
|
||||
3
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
20
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'replacement_label' identifier"
|
||||
"summary": "Replaced the 'replacement_label' identifier with the 'insert_label' identifier in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -268,26 +182,23 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/label-statements.go b/label-statements.go",
|
||||
"index 745311d..57f6c03 100644",
|
||||
"index 3d3cf164..b0a29697 100644",
|
||||
"--- a/label-statements.go",
|
||||
"+++ b/label-statements.go",
|
||||
"@@ -1,9 +1,6 @@",
|
||||
"@@ -2,6 +2,6 @@ package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
" {",
|
||||
"- replacement_label:",
|
||||
"-}",
|
||||
"-{",
|
||||
" insert_label:",
|
||||
"+ insert_label:",
|
||||
" }",
|
||||
" {",
|
||||
"- insert_label:",
|
||||
"+ replacement_label:",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "22c8014919ec0c0808de5aad53da258e151ed475..6cab5df3eecd3e4b9cde037c1d0d63c733be9b25"
|
||||
"shas": "a34375d5b52b45a8d48f0540b89d62710a4c6be1..60dc5a9a3a91da069f329c5ae369d80c47e9cc42"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-label-statements-delete-test",
|
||||
"testCaseDescription": "go-label-statements-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"label-statements.go": [
|
||||
@ -295,16 +206,16 @@
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
3
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
15
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'insert_label' identifier"
|
||||
"summary": "Deleted the 'insert_label' identifier in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -315,22 +226,24 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/label-statements.go b/label-statements.go",
|
||||
"index 57f6c03..6920e65 100644",
|
||||
"index b0a29697..79058077 100644",
|
||||
"--- a/label-statements.go",
|
||||
"+++ b/label-statements.go",
|
||||
"@@ -1,6 +1,3 @@",
|
||||
" {",
|
||||
"@@ -1,7 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-{",
|
||||
"- insert_label:",
|
||||
"-}",
|
||||
"-{",
|
||||
" replacement_label:",
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "6cab5df3eecd3e4b9cde037c1d0d63c733be9b25..66df55101e51883709ed9932d216cb965d9bef49"
|
||||
"shas": "60dc5a9a3a91da069f329c5ae369d80c47e9cc42..5a07dfd5ebb6f9aac2fc62a67df29e9f002ae2fb"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-label-statements-delete-rest-test",
|
||||
"testCaseDescription": "go-label-statements-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"label-statements.go": [
|
||||
@ -338,16 +251,16 @@
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
3
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
20
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'replacement_label' identifier"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -358,14 +271,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/label-statements.go b/label-statements.go",
|
||||
"index 6920e65..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/label-statements.go",
|
||||
"+++ b/label-statements.go",
|
||||
"@@ -1,3 +0,0 @@",
|
||||
"-{",
|
||||
"- replacement_label:",
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "66df55101e51883709ed9932d216cb965d9bef49..d2477a592fdd731c7bb7e1b1d1fe4b3b87939257"
|
||||
"shas": "5a07dfd5ebb6f9aac2fc62a67df29e9f002ae2fb..e8a0a2912cf6fee72c6e0cc0d96c5babf1cd4df1"
|
||||
}]
|
||||
|
@ -1,4 +1,46 @@
|
||||
[{
|
||||
"testCaseDescription": "go-map-literals-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"map-literals.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"map-literals.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/map-literals.go b/map-literals.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/map-literals.go",
|
||||
"+++ b/map-literals.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "64841687a4cbcda7d1eda64e527648f5cef1bf73..b2485087ecf70a7b996361b966bdfb6373510813"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-map-literals-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
@ -7,16 +49,16 @@
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
4,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
7,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 's' variable"
|
||||
"summary": "Added the 's' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -27,246 +69,22 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/map-literals.go b/map-literals.go",
|
||||
"index e69de29..16fb3cf 100644",
|
||||
"index 79058077..bb99b5ba 100644",
|
||||
"--- a/map-literals.go",
|
||||
"+++ b/map-literals.go",
|
||||
"@@ -0,0 +1,4 @@",
|
||||
"+const s = map[string]string{",
|
||||
"+\"hi\": \"hello\",",
|
||||
"+\"bye\": \"goodbye\",",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "f366494a187af73e7fcf6d60c2aa3bb503543f80..e925ebba0abf3bdf2a84d3a66d52bd0380796809"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-map-literals-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"map-literals.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 's' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 's' variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"map-literals.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/map-literals.go b/map-literals.go",
|
||||
"index 16fb3cf..b3c30ca 100644",
|
||||
"--- a/map-literals.go",
|
||||
"+++ b/map-literals.go",
|
||||
"@@ -1,3 +1,11 @@",
|
||||
"+const s = map[string]int{",
|
||||
"+\"foo\": \"bar\",",
|
||||
"+\"baz\": \"hello\",",
|
||||
"+}",
|
||||
"@@ -1,5 +1,8 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+const s = map[string]string{",
|
||||
"+\"hi\": \"hello\",",
|
||||
"+\"bye\": \"goodbye\",",
|
||||
"+}",
|
||||
" const s = map[string]string{",
|
||||
" \"hi\": \"hello\",",
|
||||
" \"bye\": \"goodbye\","
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "e925ebba0abf3bdf2a84d3a66d52bd0380796809..de28fc5f9c2b25ec7ae4a2a30d8a7edc342a76bb"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-map-literals-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"map-literals.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
22
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
25
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
15
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
21
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'int' identifier with the 'string' identifier in the s variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
6
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the \"foo\" string with the \"hi\" string in the s variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
13
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
14
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the \"bar\" string with the \"hello\" string in the s variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
6
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
6
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the \"baz\" string with the \"bye\" string in the s variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
15
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
17
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the \"hello\" string with the \"goodbye\" string in the s variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"map-literals.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/map-literals.go b/map-literals.go",
|
||||
"index b3c30ca..72c2e91 100644",
|
||||
"--- a/map-literals.go",
|
||||
"+++ b/map-literals.go",
|
||||
"@@ -1,6 +1,6 @@",
|
||||
"-const s = map[string]int{",
|
||||
"-\"foo\": \"bar\",",
|
||||
"-\"baz\": \"hello\",",
|
||||
"+const s = map[string]string{",
|
||||
"+\"hi\": \"hello\",",
|
||||
"+\"bye\": \"goodbye\",",
|
||||
" }",
|
||||
" const s = map[string]string{",
|
||||
" \"hi\": \"hello\","
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "de28fc5f9c2b25ec7ae4a2a30d8a7edc342a76bb..db595e9471ff2fef089dc2aa7f502568d1502a6a"
|
||||
"shas": "b2485087ecf70a7b996361b966bdfb6373510813..dd38ad1ed6fda4e26d6065861e629ba29b8dd33e"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-map-literals-replacement-test",
|
||||
@ -275,120 +93,87 @@
|
||||
"map-literals.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
15
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
21
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
22
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
28
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
22
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
25
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'string' identifier in the s variable"
|
||||
"summary": "Replaced the 'string' identifier with the 'int' identifier in the map[string]int dictionary of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
22
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
25
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'int' identifier in the s variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
6
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the \"foo\" string in the s variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the \"bar\" string in the s variable"
|
||||
"summary": "Added the '\"foo\": \"bar\"' pair in the map[string]int dictionary of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
6,
|
||||
6
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the \"hi\" string with the \"baz\" string in the s variable"
|
||||
"summary": "Replaced the \"hi\" string with the \"baz\" string in the \"baz\": \"hello\" pair of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
6
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the \"bye\" string in the s variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
6,
|
||||
17
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the \"goodbye\" string in the s variable"
|
||||
"summary": "Deleted the '\"bye\": \"goodbye\"' pair in the map[string]int dictionary of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -399,10 +184,13 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/map-literals.go b/map-literals.go",
|
||||
"index 72c2e91..b3c30ca 100644",
|
||||
"index bb99b5ba..a9e0b664 100644",
|
||||
"--- a/map-literals.go",
|
||||
"+++ b/map-literals.go",
|
||||
"@@ -1,6 +1,6 @@",
|
||||
"@@ -1,8 +1,8 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-const s = map[string]string{",
|
||||
"-\"hi\": \"hello\",",
|
||||
"-\"bye\": \"goodbye\",",
|
||||
@ -410,11 +198,10 @@
|
||||
"+\"foo\": \"bar\",",
|
||||
"+\"baz\": \"hello\",",
|
||||
" }",
|
||||
" const s = map[string]string{",
|
||||
" \"hi\": \"hello\","
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "db595e9471ff2fef089dc2aa7f502568d1502a6a..a7fd4cda280bf4ae44d7ada58ada52f350017735"
|
||||
"shas": "dd38ad1ed6fda4e26d6065861e629ba29b8dd33e..c4484b12af87ff7331e23808d5474b9f4534bb71"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-map-literals-delete-replacement-test",
|
||||
@ -423,48 +210,138 @@
|
||||
"map-literals.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
22
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
25
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
22
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
28
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 's' variable"
|
||||
"summary": "Replaced the 'int' identifier with the 'string' identifier in the map[string]string dictionary of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
6
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 's' variable"
|
||||
"summary": "Replaced the \"foo\" string with the \"hi\" string in the \"hi\": \"hello\" pair of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
13
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
14
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Added the 's' variable"
|
||||
"summary": "Replaced the \"bar\" string with the \"hello\" string in the \"hi\": \"hello\" pair of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
6
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
6
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the \"baz\" string with the \"bye\" string in the \"bye\": \"goodbye\" pair of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
15
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
17
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the \"hello\" string with the \"goodbye\" string in the \"bye\": \"goodbye\" pair of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -475,31 +352,27 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/map-literals.go b/map-literals.go",
|
||||
"index b3c30ca..6d5f577 100644",
|
||||
"index a9e0b664..bb99b5ba 100644",
|
||||
"--- a/map-literals.go",
|
||||
"+++ b/map-literals.go",
|
||||
"@@ -1,12 +1,8 @@",
|
||||
"@@ -1,8 +1,8 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-const s = map[string]int{",
|
||||
"-\"foo\": \"bar\",",
|
||||
"-\"baz\": \"hello\",",
|
||||
"-}",
|
||||
" const s = map[string]string{",
|
||||
" \"hi\": \"hello\",",
|
||||
" \"bye\": \"goodbye\",",
|
||||
"+const s = map[string]string{",
|
||||
"+\"hi\": \"hello\",",
|
||||
"+\"bye\": \"goodbye\",",
|
||||
" }",
|
||||
"-const s = map[string]string{",
|
||||
"-\"hi\": \"hello\",",
|
||||
"-\"bye\": \"goodbye\",",
|
||||
"+const s = map[string]int{",
|
||||
"+\"foo\": \"bar\",",
|
||||
"+\"baz\": \"hello\",",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "a7fd4cda280bf4ae44d7ada58ada52f350017735..c67615be6903f594bbda655de325f090b44a779e"
|
||||
"shas": "c4484b12af87ff7331e23808d5474b9f4534bb71..fa3a274956f58eb7630b0a1d75d0ee0566068672"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-map-literals-delete-test",
|
||||
"testCaseDescription": "go-map-literals-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"map-literals.go": [
|
||||
@ -507,16 +380,16 @@
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
4,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
7,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 's' variable"
|
||||
"summary": "Deleted the 's' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -527,23 +400,25 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/map-literals.go b/map-literals.go",
|
||||
"index 6d5f577..7f8e649 100644",
|
||||
"index bb99b5ba..79058077 100644",
|
||||
"--- a/map-literals.go",
|
||||
"+++ b/map-literals.go",
|
||||
"@@ -1,7 +1,3 @@",
|
||||
"@@ -1,8 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-const s = map[string]string{",
|
||||
"-\"hi\": \"hello\",",
|
||||
"-\"bye\": \"goodbye\",",
|
||||
"-}",
|
||||
" const s = map[string]int{",
|
||||
" \"foo\": \"bar\",",
|
||||
" \"baz\": \"hello\","
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "c67615be6903f594bbda655de325f090b44a779e..1c5da0b334e2c57d642798de8f4554d4e5d7e8b9"
|
||||
"shas": "fa3a274956f58eb7630b0a1d75d0ee0566068672..6f805cd7db38b8dd4bce3f304e7e11953170db5d"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-map-literals-delete-rest-test",
|
||||
"testCaseDescription": "go-map-literals-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"map-literals.go": [
|
||||
@ -555,12 +430,12 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 's' variable"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -571,15 +446,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/map-literals.go b/map-literals.go",
|
||||
"index 7f8e649..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/map-literals.go",
|
||||
"+++ b/map-literals.go",
|
||||
"@@ -1,4 +0,0 @@",
|
||||
"-const s = map[string]int{",
|
||||
"-\"foo\": \"bar\",",
|
||||
"-\"baz\": \"hello\",",
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "1c5da0b334e2c57d642798de8f4554d4e5d7e8b9..821d52811675ea17dd00d79b0f4e082376b97afc"
|
||||
"shas": "6f805cd7db38b8dd4bce3f304e7e11953170db5d..c7c9b52a2e3477a5c5970b67af95fa2a603c8359"
|
||||
}]
|
||||
|
@ -1,4 +1,46 @@
|
||||
[{
|
||||
"testCaseDescription": "go-map-types-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"map-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"map-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/map-types.go b/map-types.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/map-types.go",
|
||||
"+++ b/map-types.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "537b856e670ab8ae8aa4d420943369b4ba180c16..9ae70588c8e1d6409ce49d3c7e81096bfc7a1d40"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-map-types-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
@ -7,46 +49,16 @@
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'm1' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
19
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'string' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
20
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
25
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'error' identifier"
|
||||
"summary": "Added the 'm1' type declaration in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -57,182 +69,19 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/map-types.go b/map-types.go",
|
||||
"index e69de29..c86220d 100644",
|
||||
"index 79058077..01004b30 100644",
|
||||
"--- a/map-types.go",
|
||||
"+++ b/map-types.go",
|
||||
"@@ -0,0 +1 @@",
|
||||
"+type m1 map[string]error"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "26e4335c9f693f66513cac8f6c4399a4fc45ad1b..728bb866043561cbbdc1e2b9db04ac55e14bd2fe"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-map-types-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"map-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'm1' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
16
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'int' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
17
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
22
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'error' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'm1' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
19
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'string' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
20
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
25
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'error' identifier"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"map-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/map-types.go b/map-types.go",
|
||||
"index c86220d..9cc2e8b 100644",
|
||||
"--- a/map-types.go",
|
||||
"+++ b/map-types.go",
|
||||
"@@ -1 +1,3 @@",
|
||||
"+type m1 map[int]error",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+type m1 map[string]error",
|
||||
" type m1 map[string]error"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "728bb866043561cbbdc1e2b9db04ac55e14bd2fe..354b111d5e50ea7cca50e6dd82d6a096bb4dc043"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-map-types-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"map-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
16
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
19
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'int' identifier with the 'string' identifier"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"map-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/map-types.go b/map-types.go",
|
||||
"index 9cc2e8b..ee1d5a0 100644",
|
||||
"--- a/map-types.go",
|
||||
"+++ b/map-types.go",
|
||||
"@@ -1,3 +1,3 @@",
|
||||
"-type m1 map[int]error",
|
||||
"+type m1 map[string]error",
|
||||
" type m1 map[string]error",
|
||||
" type m1 map[string]error"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "354b111d5e50ea7cca50e6dd82d6a096bb4dc043..8d18ca22d7735a4d4ec15aaa47bb3f6f3cc31d43"
|
||||
"shas": "9ae70588c8e1d6409ce49d3c7e81096bfc7a1d40..44568c991c3070bcb1d05df16e1decb8ef8405f8"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-map-types-replacement-test",
|
||||
@ -244,27 +93,27 @@
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
19
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
16
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'string' identifier with the 'int' identifier"
|
||||
"summary": "Replaced the 'string' identifier with the 'int' identifier in the 'm1' type declaration of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -275,17 +124,19 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/map-types.go b/map-types.go",
|
||||
"index ee1d5a0..9cc2e8b 100644",
|
||||
"index 01004b30..a118e920 100644",
|
||||
"--- a/map-types.go",
|
||||
"+++ b/map-types.go",
|
||||
"@@ -1,3 +1,3 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-type m1 map[string]error",
|
||||
"+type m1 map[int]error",
|
||||
" type m1 map[string]error",
|
||||
" type m1 map[string]error"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "8d18ca22d7735a4d4ec15aaa47bb3f6f3cc31d43..f39a4aa0643801fca32ef454238ad77644439dab"
|
||||
"shas": "44568c991c3070bcb1d05df16e1decb8ef8405f8..b67e615d6f6edf3c3f181556c6a1bf9d77b80e88"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-map-types-delete-replacement-test",
|
||||
@ -294,138 +145,30 @@
|
||||
"map-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
8
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
16
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
19
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'm1' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
16
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'int' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
17
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
22
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'error' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'm1' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
19
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'string' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
20
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
25
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'error' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'm1' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
16
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'int' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
17
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
22
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'error' identifier"
|
||||
"summary": "Replaced the 'int' identifier with the 'string' identifier in the 'm1' type declaration of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -436,20 +179,22 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/map-types.go b/map-types.go",
|
||||
"index 9cc2e8b..a863ca9 100644",
|
||||
"index a118e920..01004b30 100644",
|
||||
"--- a/map-types.go",
|
||||
"+++ b/map-types.go",
|
||||
"@@ -1,3 +1,2 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-type m1 map[int]error",
|
||||
"-type m1 map[string]error",
|
||||
" type m1 map[string]error",
|
||||
"+type m1 map[int]error"
|
||||
"+type m1 map[string]error",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "f39a4aa0643801fca32ef454238ad77644439dab..103b721414de3bbad2adbe781738973424c8e468"
|
||||
"shas": "b67e615d6f6edf3c3f181556c6a1bf9d77b80e88..8adfcb96271210db7e6ff4d4f8e9614e18a7ea2d"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-map-types-delete-test",
|
||||
"testCaseDescription": "go-map-types-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"map-types.go": [
|
||||
@ -457,46 +202,16 @@
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'm1' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
19
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'string' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
20
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
25
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'error' identifier"
|
||||
"summary": "Deleted the 'm1' type declaration in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -507,18 +222,22 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/map-types.go b/map-types.go",
|
||||
"index a863ca9..d7e6949 100644",
|
||||
"index 01004b30..79058077 100644",
|
||||
"--- a/map-types.go",
|
||||
"+++ b/map-types.go",
|
||||
"@@ -1,2 +1 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-type m1 map[string]error",
|
||||
" type m1 map[int]error"
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "103b721414de3bbad2adbe781738973424c8e468..ac2d072f1c3048451e824aaf604dcda59c62c4a3"
|
||||
"shas": "8adfcb96271210db7e6ff4d4f8e9614e18a7ea2d..d71ece556522fb22d8dce8a04232dd7b084db88a"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-map-types-delete-rest-test",
|
||||
"testCaseDescription": "go-map-types-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"map-types.go": [
|
||||
@ -527,45 +246,15 @@
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
6
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
8
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'm1' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
16
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'int' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
17
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
22
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'error' identifier"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -576,12 +265,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/map-types.go b/map-types.go",
|
||||
"index d7e6949..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/map-types.go",
|
||||
"+++ b/map-types.go",
|
||||
"@@ -1 +0,0 @@",
|
||||
"-type m1 map[int]error"
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "ac2d072f1c3048451e824aaf604dcda59c62c4a3..3cf1fd2c498440d58dd5df34a4f217c00efa71b1"
|
||||
"shas": "d71ece556522fb22d8dce8a04232dd7b084db88a..2f35db8e0302874790f1e855b1604464a758129c"
|
||||
}]
|
||||
|
File diff suppressed because it is too large
Load Diff
286
test/corpus/diff-summaries/go/modifying-struct-fields.json
Normal file
286
test/corpus/diff-summaries/go/modifying-struct-fields.json
Normal file
@ -0,0 +1,286 @@
|
||||
[{
|
||||
"testCaseDescription": "go-modifying-struct-fields-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"modifying-struct-fields.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"modifying-struct-fields.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/modifying-struct-fields.go b/modifying-struct-fields.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/modifying-struct-fields.go",
|
||||
"+++ b/modifying-struct-fields.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "96429faca853f0301df4b0d4d43ce26e3011129c..327d46912a0379199ca874a02de94cbd4822e017"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-modifying-struct-fields-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"modifying-struct-fields.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'ctx' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"modifying-struct-fields.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/modifying-struct-fields.go b/modifying-struct-fields.go",
|
||||
"index 79058077..8b8c10e6 100644",
|
||||
"--- a/modifying-struct-fields.go",
|
||||
"+++ b/modifying-struct-fields.go",
|
||||
"@@ -1,5 +1,7 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+ctx := &uploadContext{",
|
||||
"+ Remote: remote",
|
||||
"+}",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "327d46912a0379199ca874a02de94cbd4822e017..edbdc72526206b55a5a68574067653f9a012139e"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-modifying-struct-fields-replacement-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"modifying-struct-fields.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
18
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
35
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'Remote: remote' pair with the 'trackedLocksMu: new(sync.Mutex)' pair in the ctx var assignment of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"modifying-struct-fields.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/modifying-struct-fields.go b/modifying-struct-fields.go",
|
||||
"index 8b8c10e6..e16cd243 100644",
|
||||
"--- a/modifying-struct-fields.go",
|
||||
"+++ b/modifying-struct-fields.go",
|
||||
"@@ -2,6 +2,6 @@ package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
" ctx := &uploadContext{",
|
||||
"- Remote: remote",
|
||||
"+ trackedLocksMu: new(sync.Mutex)",
|
||||
" }",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "edbdc72526206b55a5a68574067653f9a012139e..d297555f9562fdc2f07263c0d3f4448a2d993af6"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-modifying-struct-fields-delete-replacement-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"modifying-struct-fields.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
35
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
18
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'trackedLocksMu: new(sync.Mutex)' pair with the 'Remote: remote' pair in the ctx var assignment of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"modifying-struct-fields.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/modifying-struct-fields.go b/modifying-struct-fields.go",
|
||||
"index e16cd243..8b8c10e6 100644",
|
||||
"--- a/modifying-struct-fields.go",
|
||||
"+++ b/modifying-struct-fields.go",
|
||||
"@@ -2,6 +2,6 @@ package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
" ctx := &uploadContext{",
|
||||
"- trackedLocksMu: new(sync.Mutex)",
|
||||
"+ Remote: remote",
|
||||
" }",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "d297555f9562fdc2f07263c0d3f4448a2d993af6..0424e6283242743718ac65313bf399f22e87003f"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-modifying-struct-fields-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"modifying-struct-fields.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'ctx' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"modifying-struct-fields.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/modifying-struct-fields.go b/modifying-struct-fields.go",
|
||||
"index 8b8c10e6..79058077 100644",
|
||||
"--- a/modifying-struct-fields.go",
|
||||
"+++ b/modifying-struct-fields.go",
|
||||
"@@ -1,7 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-ctx := &uploadContext{",
|
||||
"- Remote: remote",
|
||||
"-}",
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "0424e6283242743718ac65313bf399f22e87003f..1e8d55f993118e8493fd77e4029b4126ca55ea76"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-modifying-struct-fields-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"modifying-struct-fields.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"modifying-struct-fields.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/modifying-struct-fields.go b/modifying-struct-fields.go",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/modifying-struct-fields.go",
|
||||
"+++ b/modifying-struct-fields.go",
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "1e8d55f993118e8493fd77e4029b4126ca55ea76..cabeb4be978509ff8b604c14a85f64a96314cd7a"
|
||||
}]
|
@ -0,0 +1,393 @@
|
||||
[{
|
||||
"testCaseDescription": "go-parameter-declarations-with-types-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"parameter-declarations-with-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"parameter-declarations-with-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/parameter-declarations-with-types.go b/parameter-declarations-with-types.go",
|
||||
"index e69de29b..a92cefed 100644",
|
||||
"--- a/parameter-declarations-with-types.go",
|
||||
"+++ b/parameter-declarations-with-types.go",
|
||||
"@@ -0,0 +1,6 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+}",
|
||||
"+",
|
||||
"+"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "df3298de1cff4cc80875946fc6abeec7bf257f39..932c7e3ec9b93568845977a43626bb4a0fd3b90d"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-parameter-declarations-with-types-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"parameter-declarations-with-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'foo' function in the main module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"parameter-declarations-with-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/parameter-declarations-with-types.go b/parameter-declarations-with-types.go",
|
||||
"index a92cefed..ed6bff2d 100644",
|
||||
"--- a/parameter-declarations-with-types.go",
|
||||
"+++ b/parameter-declarations-with-types.go",
|
||||
"@@ -3,4 +3,5 @@ package main",
|
||||
" func main() {",
|
||||
" }",
|
||||
" ",
|
||||
"-",
|
||||
"+func foo(a int, b string) {",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "932c7e3ec9b93568845977a43626bb4a0fd3b90d..a1a774045a4b7922d5e0e70622f298763f8fe5d7"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-parameter-declarations-with-types-replacement-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"parameter-declarations-with-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
12
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
15
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
12
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
18
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'int' identifier with the 'string' identifier in the foo function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
11
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
11
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'a' identifier with the 'x' identifier in the foo function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
19
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
25
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
22
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
28
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'string' identifier with the 'uint64' identifier in the foo function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
17
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
18
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
20
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
21
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'b' identifier with the 'y' identifier in the foo function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"parameter-declarations-with-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/parameter-declarations-with-types.go b/parameter-declarations-with-types.go",
|
||||
"index ed6bff2d..fcb6a303 100644",
|
||||
"--- a/parameter-declarations-with-types.go",
|
||||
"+++ b/parameter-declarations-with-types.go",
|
||||
"@@ -3,5 +3,5 @@ package main",
|
||||
" func main() {",
|
||||
" }",
|
||||
" ",
|
||||
"-func foo(a int, b string) {",
|
||||
"+func foo(x string, y uint64) {",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "a1a774045a4b7922d5e0e70622f298763f8fe5d7..54ff8e688514bd1a0ee7e588fffff1be0ce47645"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-parameter-declarations-with-types-delete-replacement-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"parameter-declarations-with-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
6,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
15
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a int' parameter declaration in the foo function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
11
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
17
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
18
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'x' identifier with the 'b' identifier in the foo function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
6,
|
||||
20
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
28
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'y uint64' parameter declaration in the foo function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"parameter-declarations-with-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/parameter-declarations-with-types.go b/parameter-declarations-with-types.go",
|
||||
"index fcb6a303..ed6bff2d 100644",
|
||||
"--- a/parameter-declarations-with-types.go",
|
||||
"+++ b/parameter-declarations-with-types.go",
|
||||
"@@ -3,5 +3,5 @@ package main",
|
||||
" func main() {",
|
||||
" }",
|
||||
" ",
|
||||
"-func foo(x string, y uint64) {",
|
||||
"+func foo(a int, b string) {",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "54ff8e688514bd1a0ee7e588fffff1be0ce47645..ca8a328836cd4073670d5fbb553d60a2d5da5149"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-parameter-declarations-with-types-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"parameter-declarations-with-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'foo' function in the main module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"parameter-declarations-with-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/parameter-declarations-with-types.go b/parameter-declarations-with-types.go",
|
||||
"index ed6bff2d..a92cefed 100644",
|
||||
"--- a/parameter-declarations-with-types.go",
|
||||
"+++ b/parameter-declarations-with-types.go",
|
||||
"@@ -3,5 +3,4 @@ package main",
|
||||
" func main() {",
|
||||
" }",
|
||||
" ",
|
||||
"-func foo(a int, b string) {",
|
||||
"-}",
|
||||
"+"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "ca8a328836cd4073670d5fbb553d60a2d5da5149..17afa32d5d35d9b2169715bf8e3cf7b6c8dbfd74"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-parameter-declarations-with-types-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"parameter-declarations-with-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"parameter-declarations-with-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/parameter-declarations-with-types.go b/parameter-declarations-with-types.go",
|
||||
"index a92cefed..e69de29b 100644",
|
||||
"--- a/parameter-declarations-with-types.go",
|
||||
"+++ b/parameter-declarations-with-types.go",
|
||||
"@@ -1,6 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-}",
|
||||
"-",
|
||||
"-"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "17afa32d5d35d9b2169715bf8e3cf7b6c8dbfd74..ef1ac04aeb5238b9f803a01487634a5dbb904dd2"
|
||||
}]
|
@ -1,4 +1,46 @@
|
||||
[{
|
||||
"testCaseDescription": "go-pointer-types-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"pointer-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"pointer-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/pointer-types.go b/pointer-types.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/pointer-types.go",
|
||||
"+++ b/pointer-types.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "2f35db8e0302874790f1e855b1604464a758129c..e0303fed6749f451d05079830f899ce0f494f614"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-pointer-types-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
@ -7,61 +49,31 @@
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'p1' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'string' identifier"
|
||||
"summary": "Added the 'p1' type declaration in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'p2' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
6,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'p1' identifier"
|
||||
"summary": "Added the 'p2' type declaration in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -72,255 +84,22 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/pointer-types.go b/pointer-types.go",
|
||||
"index e69de29..05b4659 100644",
|
||||
"index 79058077..98e7b8a9 100644",
|
||||
"--- a/pointer-types.go",
|
||||
"+++ b/pointer-types.go",
|
||||
"@@ -0,0 +1,4 @@",
|
||||
"+type (",
|
||||
"+p1 *string",
|
||||
"+p2 **p1",
|
||||
"+)"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "3cf1fd2c498440d58dd5df34a4f217c00efa71b1..cff34d9b4f8663f9e2a85316a00629c162eaab24"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-pointer-types-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"pointer-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'p1' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'int' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'p2' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'p3' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'p1' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
6,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'string' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
7,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'p2' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
7,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'p1' identifier"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"pointer-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/pointer-types.go b/pointer-types.go",
|
||||
"index 05b4659..95e685d 100644",
|
||||
"--- a/pointer-types.go",
|
||||
"+++ b/pointer-types.go",
|
||||
"@@ -1,4 +1,12 @@",
|
||||
" type (",
|
||||
"+p1 *int",
|
||||
"+p2 **p3",
|
||||
"+)",
|
||||
"@@ -1,5 +1,8 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+type (",
|
||||
"+p1 *string",
|
||||
"+p2 **p1",
|
||||
"+)",
|
||||
"+type (",
|
||||
" p1 *string",
|
||||
" p2 **p1",
|
||||
" )"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "cff34d9b4f8663f9e2a85316a00629c162eaab24..0a00ceceb6353a9970f1aa9ced5771b5b21883c6"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-pointer-types-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"pointer-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
8
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
11
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'int' identifier with the 'string' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
8
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
8
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'p3' identifier with the 'p1' identifier"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"pointer-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/pointer-types.go b/pointer-types.go",
|
||||
"index 95e685d..74ff673 100644",
|
||||
"--- a/pointer-types.go",
|
||||
"+++ b/pointer-types.go",
|
||||
"@@ -1,6 +1,6 @@",
|
||||
" type (",
|
||||
"-p1 *int",
|
||||
"-p2 **p3",
|
||||
"+p1 *string",
|
||||
"+p2 **p1",
|
||||
" )",
|
||||
" type (",
|
||||
" p1 *string"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "0a00ceceb6353a9970f1aa9ced5771b5b21883c6..2f99a01b337c02263ca4e9399902b16aaba1dedf"
|
||||
"shas": "e0303fed6749f451d05079830f899ce0f494f614..a2a702f361a75afe7a57eca5f42338b32f802f8d"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-pointer-types-replacement-test",
|
||||
@ -332,54 +111,54 @@
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
11
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
8
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'string' identifier with the 'int' identifier"
|
||||
"summary": "Replaced the 'string' identifier with the 'int' identifier in the *int pointer type of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
6,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
6,
|
||||
8
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
6,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
6,
|
||||
8
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'p1' identifier with the 'p3' identifier"
|
||||
"summary": "Replaced the 'p1' identifier with the 'p3' identifier in the *p3 pointer type of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -390,21 +169,22 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/pointer-types.go b/pointer-types.go",
|
||||
"index 74ff673..95e685d 100644",
|
||||
"index 98e7b8a9..36eb5ffb 100644",
|
||||
"--- a/pointer-types.go",
|
||||
"+++ b/pointer-types.go",
|
||||
"@@ -1,6 +1,6 @@",
|
||||
"@@ -2,7 +2,7 @@ package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
" type (",
|
||||
"-p1 *string",
|
||||
"-p2 **p1",
|
||||
"+p1 *int",
|
||||
"+p2 **p3",
|
||||
" )",
|
||||
" type (",
|
||||
" p1 *string"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "2f99a01b337c02263ca4e9399902b16aaba1dedf..f13af84d4486664581e87d4a034aef0bad3a207a"
|
||||
"shas": "a2a702f361a75afe7a57eca5f42338b32f802f8d..c29c8cd9b06066a9f9b95f6d90abf0d388121621"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-pointer-types-delete-replacement-test",
|
||||
@ -413,183 +193,57 @@
|
||||
"pointer-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
3
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
8
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
11
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'p1' identifier"
|
||||
"summary": "Replaced the 'int' identifier with the 'string' identifier in the *string pointer type of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
8
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
8
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
8
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'int' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'p2' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'p3' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'p1' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
6,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'string' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
7,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'p2' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
7,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'p1' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'p1' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
6,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'int' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
7,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'p2' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
7,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'p3' identifier"
|
||||
"summary": "Replaced the 'p3' identifier with the 'p1' identifier in the *p1 pointer type of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -600,30 +254,25 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/pointer-types.go b/pointer-types.go",
|
||||
"index 95e685d..4556eeb 100644",
|
||||
"index 36eb5ffb..98e7b8a9 100644",
|
||||
"--- a/pointer-types.go",
|
||||
"+++ b/pointer-types.go",
|
||||
"@@ -1,12 +1,8 @@",
|
||||
"@@ -2,7 +2,7 @@ package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
" type (",
|
||||
"-p1 *int",
|
||||
"-p2 **p3",
|
||||
"-)",
|
||||
"-type (",
|
||||
" p1 *string",
|
||||
" p2 **p1",
|
||||
"+p1 *string",
|
||||
"+p2 **p1",
|
||||
" )",
|
||||
" type (",
|
||||
"-p1 *string",
|
||||
"-p2 **p1",
|
||||
"+p1 *int",
|
||||
"+p2 **p3",
|
||||
" )"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "f13af84d4486664581e87d4a034aef0bad3a207a..1dfbf23712676794ded97d5e9a411ce7ce56fc17"
|
||||
"shas": "c29c8cd9b06066a9f9b95f6d90abf0d388121621..dc43d6e290768816185a12d2bfc43db015eb8960"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-pointer-types-delete-test",
|
||||
"testCaseDescription": "go-pointer-types-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"pointer-types.go": [
|
||||
@ -631,61 +280,31 @@
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'p1' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'string' identifier"
|
||||
"summary": "Deleted the 'p1' type declaration in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'p2' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
6,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'p1' identifier"
|
||||
"summary": "Deleted the 'p2' type declaration in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -696,24 +315,25 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/pointer-types.go b/pointer-types.go",
|
||||
"index 4556eeb..5d13f48 100644",
|
||||
"index 98e7b8a9..79058077 100644",
|
||||
"--- a/pointer-types.go",
|
||||
"+++ b/pointer-types.go",
|
||||
"@@ -1,8 +1,4 @@",
|
||||
" type (",
|
||||
"@@ -1,8 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-type (",
|
||||
"-p1 *string",
|
||||
"-p2 **p1",
|
||||
"-)",
|
||||
"-type (",
|
||||
" p1 *int",
|
||||
" p2 **p3",
|
||||
" )"
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "1dfbf23712676794ded97d5e9a411ce7ce56fc17..d8ac0c302b514259999149901eb3c217040e7407"
|
||||
"shas": "dc43d6e290768816185a12d2bfc43db015eb8960..1c982494af2b508fae567a6c441a7a15c54d4a24"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-pointer-types-delete-rest-test",
|
||||
"testCaseDescription": "go-pointer-types-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"pointer-types.go": [
|
||||
@ -721,61 +341,16 @@
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'p1' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'int' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
3
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'p2' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'p3' identifier"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -786,15 +361,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/pointer-types.go b/pointer-types.go",
|
||||
"index 5d13f48..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/pointer-types.go",
|
||||
"+++ b/pointer-types.go",
|
||||
"@@ -1,4 +0,0 @@",
|
||||
"-type (",
|
||||
"-p1 *int",
|
||||
"-p2 **p3",
|
||||
"-)"
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "d8ac0c302b514259999149901eb3c217040e7407..043e40fb43f738d1d0ddd89c38bc83159bcc7a8f"
|
||||
"shas": "1c982494af2b508fae567a6c441a7a15c54d4a24..0ba70ac16df68cc3eb0b6318c3b784d701f4b216"
|
||||
}]
|
||||
|
@ -1,4 +1,46 @@
|
||||
[{
|
||||
"testCaseDescription": "go-qualified-types-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"qualified-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"qualified-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/qualified-types.go b/qualified-types.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/qualified-types.go",
|
||||
"+++ b/qualified-types.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "96a2caf2b396eb1844dfd668cb913452ae09c4a6..4aef9a3bb124cee7c7246a2692ef219fdb688a75"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-qualified-types-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
@ -7,46 +49,16 @@
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'c' identifier"
|
||||
"summary": "Added the 'a' type declaration in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -57,236 +69,19 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/qualified-types.go b/qualified-types.go",
|
||||
"index e69de29..7840cac 100644",
|
||||
"index 79058077..e03cf221 100644",
|
||||
"--- a/qualified-types.go",
|
||||
"+++ b/qualified-types.go",
|
||||
"@@ -0,0 +1 @@",
|
||||
"+type a b.c"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "a5b8a6804181af3a1387f9a23e3f85c44ddb6082..1534853219b560e38a40a23b1f54b3791e78a6a8"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-qualified-types-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"qualified-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'x' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'y' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'z' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'c' identifier"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"qualified-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/qualified-types.go b/qualified-types.go",
|
||||
"index 7840cac..0256b29 100644",
|
||||
"--- a/qualified-types.go",
|
||||
"+++ b/qualified-types.go",
|
||||
"@@ -1 +1,3 @@",
|
||||
"+type x y.z",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+type a b.c",
|
||||
" type a b.c"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "1534853219b560e38a40a23b1f54b3791e78a6a8..9a0469bb91c527b8c2d07f8ec53ab8cdfcf7bd9f"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-qualified-types-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"qualified-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
7
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
7
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'x' identifier with the 'a' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
9
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
9
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'y' identifier with the 'b' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
11
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
11
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'z' identifier with the 'c' identifier"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"qualified-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/qualified-types.go b/qualified-types.go",
|
||||
"index 0256b29..e963dfd 100644",
|
||||
"--- a/qualified-types.go",
|
||||
"+++ b/qualified-types.go",
|
||||
"@@ -1,3 +1,3 @@",
|
||||
"-type x y.z",
|
||||
"+type a b.c",
|
||||
" type a b.c",
|
||||
" type a b.c"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "9a0469bb91c527b8c2d07f8ec53ab8cdfcf7bd9f..da94ab3ccc5de8e4a034254dbe2909d2b8fa9626"
|
||||
"shas": "4aef9a3bb124cee7c7246a2692ef219fdb688a75..0f7f533345885a7f2cbe3e6215ff7a30da263beb"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-qualified-types-replacement-test",
|
||||
@ -298,81 +93,54 @@
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
7
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
7
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'a' identifier with the 'x' identifier"
|
||||
"summary": "Replaced the 'a' identifier with the 'x' identifier in the 'x' type declaration of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
9
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
9
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'b' identifier with the 'y' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
11
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
10
|
||||
4,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
11
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'c' identifier with the 'z' identifier"
|
||||
"summary": "Replaced the 'b.c' qualified identifier with the 'y.z' qualified identifier in the 'x' type declaration of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -383,17 +151,19 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/qualified-types.go b/qualified-types.go",
|
||||
"index e963dfd..0256b29 100644",
|
||||
"index e03cf221..241e5267 100644",
|
||||
"--- a/qualified-types.go",
|
||||
"+++ b/qualified-types.go",
|
||||
"@@ -1,3 +1,3 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-type a b.c",
|
||||
"+type x y.z",
|
||||
" type a b.c",
|
||||
" type a b.c"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "da94ab3ccc5de8e4a034254dbe2909d2b8fa9626..d75d90717c183e1beaefacd4e4531d6d7da64316"
|
||||
"shas": "0f7f533345885a7f2cbe3e6215ff7a30da263beb..aa7d555ba3072f33619a27337bbb9507ad6f70ca"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-qualified-types-delete-replacement-test",
|
||||
@ -402,138 +172,57 @@
|
||||
"qualified-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
7
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
7
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
7
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'x' identifier"
|
||||
"summary": "Replaced the 'x' identifier with the 'a' identifier in the 'a' type declaration of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
9
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
11
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
11
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'y' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'z' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'c' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'x' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'y' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'z' identifier"
|
||||
"summary": "Replaced the 'y.z' qualified identifier with the 'b.c' qualified identifier in the 'a' type declaration of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -544,20 +233,22 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/qualified-types.go b/qualified-types.go",
|
||||
"index 0256b29..4525e0a 100644",
|
||||
"index 241e5267..e03cf221 100644",
|
||||
"--- a/qualified-types.go",
|
||||
"+++ b/qualified-types.go",
|
||||
"@@ -1,3 +1,2 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-type x y.z",
|
||||
"-type a b.c",
|
||||
" type a b.c",
|
||||
"+type x y.z"
|
||||
"+type a b.c",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "d75d90717c183e1beaefacd4e4531d6d7da64316..40fe32e2e038391f91cb6a8e14ac554e222e1465"
|
||||
"shas": "aa7d555ba3072f33619a27337bbb9507ad6f70ca..e1cbca9a58ecb01bc8bda3e35530cc3d579e90c4"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-qualified-types-delete-test",
|
||||
"testCaseDescription": "go-qualified-types-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"qualified-types.go": [
|
||||
@ -565,46 +256,16 @@
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'c' identifier"
|
||||
"summary": "Deleted the 'a' type declaration in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -615,18 +276,22 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/qualified-types.go b/qualified-types.go",
|
||||
"index 4525e0a..f31a963 100644",
|
||||
"index e03cf221..79058077 100644",
|
||||
"--- a/qualified-types.go",
|
||||
"+++ b/qualified-types.go",
|
||||
"@@ -1,2 +1 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-type a b.c",
|
||||
" type x y.z"
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "40fe32e2e038391f91cb6a8e14ac554e222e1465..3cd11bed0abcaeb3d4ce762dc40ef452183e6768"
|
||||
"shas": "e1cbca9a58ecb01bc8bda3e35530cc3d579e90c4..6abb1901a0a0ffc573d2e8f2fc6d61b22921eb75"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-qualified-types-delete-rest-test",
|
||||
"testCaseDescription": "go-qualified-types-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"qualified-types.go": [
|
||||
@ -635,45 +300,15 @@
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
6
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
7
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'x' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'y' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'z' identifier"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -684,12 +319,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/qualified-types.go b/qualified-types.go",
|
||||
"index f31a963..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/qualified-types.go",
|
||||
"+++ b/qualified-types.go",
|
||||
"@@ -1 +0,0 @@",
|
||||
"-type x y.z"
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "3cd11bed0abcaeb3d4ce762dc40ef452183e6768..4605c9308ffc84f9d63dc5e62562b0461d53d5b9"
|
||||
"shas": "6abb1901a0a0ffc573d2e8f2fc6d61b22921eb75..95b89b9b110156a8ff35bda066874de1c055bb2c"
|
||||
}]
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,46 @@
|
||||
[{
|
||||
"testCaseDescription": "go-select-statements-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"select-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"select-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/select-statements.go b/select-statements.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/select-statements.go",
|
||||
"+++ b/select-statements.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "5ef8bc0eb6c5afcf5b71c3773b50aacebffe32d5..fc27fba6f9c1e19251a29214c0bc8599c48a93dc"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-select-statements-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
@ -7,16 +49,16 @@
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
13,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added a select statement"
|
||||
"summary": "Added a select statement in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -27,82 +69,14 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/select-statements.go b/select-statements.go",
|
||||
"index e69de29..7fe1c0b 100644",
|
||||
"index 79058077..6806fa67 100644",
|
||||
"--- a/select-statements.go",
|
||||
"+++ b/select-statements.go",
|
||||
"@@ -0,0 +1,10 @@",
|
||||
"+select {",
|
||||
"+ case x := <-c:",
|
||||
"+ println(x)",
|
||||
"+ case y <- c:",
|
||||
"+ println(5)",
|
||||
"+ case <-time.After(1):",
|
||||
"+ println(6)",
|
||||
"+ default:",
|
||||
"+ return",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "c02f9252b66f4d334e7e4d5cc2b56665c5d0b45f..2b2fbf697988912a16c858851710652dae25a559"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-select-statements-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"select-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added a select statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
11,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
20,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added a select statement"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"select-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/select-statements.go b/select-statements.go",
|
||||
"index 7fe1c0b..1403fc7 100644",
|
||||
"--- a/select-statements.go",
|
||||
"+++ b/select-statements.go",
|
||||
"@@ -1,4 +1,24 @@",
|
||||
" select {",
|
||||
"+ case a := <-c:",
|
||||
"+ println(x)",
|
||||
"+ case b <- c:",
|
||||
"+ println(5)",
|
||||
"+ case <-time.After(2):",
|
||||
"+ println(6)",
|
||||
"+ default:",
|
||||
"+ return",
|
||||
"+}",
|
||||
"@@ -1,5 +1,14 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+select {",
|
||||
"+ case x := <-c:",
|
||||
"+ println(x)",
|
||||
@ -113,128 +87,10 @@
|
||||
"+ default:",
|
||||
"+ return",
|
||||
"+}",
|
||||
"+select {",
|
||||
" case x := <-c:",
|
||||
" println(x)",
|
||||
" case y <- c:"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "2b2fbf697988912a16c858851710652dae25a559..983b410af87ea7510331b9acfece407fa4388e09"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-select-statements-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"select-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
9
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
9
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'a' identifier with the 'x' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
9
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
9
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'b' identifier with the 'y' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
21
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
22
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
21
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
22
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '2' with '1'"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"select-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/select-statements.go b/select-statements.go",
|
||||
"index 1403fc7..3e83983 100644",
|
||||
"--- a/select-statements.go",
|
||||
"+++ b/select-statements.go",
|
||||
"@@ -1,9 +1,9 @@",
|
||||
" select {",
|
||||
"- case a := <-c:",
|
||||
"+ case x := <-c:",
|
||||
" println(x)",
|
||||
"- case b <- c:",
|
||||
"+ case y <- c:",
|
||||
" println(5)",
|
||||
"- case <-time.After(2):",
|
||||
"+ case <-time.After(1):",
|
||||
" println(6)",
|
||||
" default:",
|
||||
" return"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "983b410af87ea7510331b9acfece407fa4388e09..a23994405fb8e283ccb2d2c95074563cceb23b83"
|
||||
"shas": "fc27fba6f9c1e19251a29214c0bc8599c48a93dc..5b3000889bd5f6fed85f762e41c07c37d058fce5"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-select-statements-replacement-test",
|
||||
@ -246,81 +102,81 @@
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
9
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
9
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'x' identifier with the 'a' identifier"
|
||||
"summary": "Replaced the 'x' identifier with the 'a' identifier in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
7,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
7,
|
||||
9
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
7,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
7,
|
||||
9
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'y' identifier with the 'b' identifier"
|
||||
"summary": "Replaced the 'y' identifier with the 'b' identifier in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
9,
|
||||
21
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
9,
|
||||
22
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
9,
|
||||
21
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
9,
|
||||
22
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '1' with '2'"
|
||||
"summary": "Replaced '1' with '2' in the time[After](2) function call of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -331,10 +187,12 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/select-statements.go b/select-statements.go",
|
||||
"index 3e83983..1403fc7 100644",
|
||||
"index 6806fa67..1ca26fb9 100644",
|
||||
"--- a/select-statements.go",
|
||||
"+++ b/select-statements.go",
|
||||
"@@ -1,9 +1,9 @@",
|
||||
"@@ -2,11 +2,11 @@ package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
" select {",
|
||||
"- case x := <-c:",
|
||||
"+ case a := <-c:",
|
||||
@ -349,7 +207,7 @@
|
||||
" return"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "a23994405fb8e283ccb2d2c95074563cceb23b83..3f72a17c112bb126b288f9683109d13f918567e6"
|
||||
"shas": "5b3000889bd5f6fed85f762e41c07c37d058fce5..cfad5a03e0e5e2b92b80d8013221c57bb8b54dbb"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-select-statements-delete-replacement-test",
|
||||
@ -358,48 +216,84 @@
|
||||
"select-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
2
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
9
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
9
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted a select statement"
|
||||
"summary": "Replaced the 'a' identifier with the 'x' identifier in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
11,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
20,
|
||||
2
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
7,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
9
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
7,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
9
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted a select statement"
|
||||
"summary": "Replaced the 'b' identifier with the 'y' identifier in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
11,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
20,
|
||||
2
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
9,
|
||||
21
|
||||
],
|
||||
"end": [
|
||||
9,
|
||||
22
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
9,
|
||||
21
|
||||
],
|
||||
"end": [
|
||||
9,
|
||||
22
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Added a select statement"
|
||||
"summary": "Replaced '2' with '1' in the time[After](1) function call of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -410,45 +304,30 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/select-statements.go b/select-statements.go",
|
||||
"index 1403fc7..234dd89 100644",
|
||||
"index 1ca26fb9..6806fa67 100644",
|
||||
"--- a/select-statements.go",
|
||||
"+++ b/select-statements.go",
|
||||
"@@ -1,14 +1,4 @@",
|
||||
"@@ -2,11 +2,11 @@ package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
" select {",
|
||||
"- case a := <-c:",
|
||||
"- println(x)",
|
||||
"+ case x := <-c:",
|
||||
" println(x)",
|
||||
"- case b <- c:",
|
||||
"- println(5)",
|
||||
"- case <-time.After(2):",
|
||||
"- println(6)",
|
||||
"- default:",
|
||||
"- return",
|
||||
"-}",
|
||||
"-select {",
|
||||
" case x := <-c:",
|
||||
" println(x)",
|
||||
" case y <- c:",
|
||||
"@@ -19,11 +9,11 @@ select {",
|
||||
" return",
|
||||
" }",
|
||||
" select {",
|
||||
"- case x := <-c:",
|
||||
"+ case a := <-c:",
|
||||
" println(x)",
|
||||
"- case y <- c:",
|
||||
"+ case b <- c:",
|
||||
"+ case y <- c:",
|
||||
" println(5)",
|
||||
"- case <-time.After(1):",
|
||||
"+ case <-time.After(2):",
|
||||
"- case <-time.After(2):",
|
||||
"+ case <-time.After(1):",
|
||||
" println(6)",
|
||||
" default:",
|
||||
" return"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "3f72a17c112bb126b288f9683109d13f918567e6..9d5bc8c2e6e70762403f8a1f02ac863410533023"
|
||||
"shas": "cfad5a03e0e5e2b92b80d8013221c57bb8b54dbb..ef37033c96b063deb172c7ceb9cbc6c659cb6f70"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-select-statements-delete-test",
|
||||
"testCaseDescription": "go-select-statements-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"select-statements.go": [
|
||||
@ -456,16 +335,16 @@
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
13,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted a select statement"
|
||||
"summary": "Deleted a select statement in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -476,11 +355,14 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/select-statements.go b/select-statements.go",
|
||||
"index 234dd89..d513030 100644",
|
||||
"index 6806fa67..79058077 100644",
|
||||
"--- a/select-statements.go",
|
||||
"+++ b/select-statements.go",
|
||||
"@@ -1,14 +1,4 @@",
|
||||
" select {",
|
||||
"@@ -1,14 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-select {",
|
||||
"- case x := <-c:",
|
||||
"- println(x)",
|
||||
"- case y <- c:",
|
||||
@ -490,16 +372,14 @@
|
||||
"- default:",
|
||||
"- return",
|
||||
"-}",
|
||||
"-select {",
|
||||
" case a := <-c:",
|
||||
" println(x)",
|
||||
" case b <- c:"
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "9d5bc8c2e6e70762403f8a1f02ac863410533023..30985a629ade98c4fde5bf79a200bd2697dc9d9f"
|
||||
"shas": "ef37033c96b063deb172c7ceb9cbc6c659cb6f70..b4c5ae05e9993d2a8f9abcfa1b1a5e1ff4677aed"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-select-statements-delete-rest-test",
|
||||
"testCaseDescription": "go-select-statements-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"select-statements.go": [
|
||||
@ -511,12 +391,12 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
10,
|
||||
2
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted a select statement"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -527,21 +407,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/select-statements.go b/select-statements.go",
|
||||
"index d513030..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/select-statements.go",
|
||||
"+++ b/select-statements.go",
|
||||
"@@ -1,10 +0,0 @@",
|
||||
"-select {",
|
||||
"- case a := <-c:",
|
||||
"- println(x)",
|
||||
"- case b <- c:",
|
||||
"- println(5)",
|
||||
"- case <-time.After(2):",
|
||||
"- println(6)",
|
||||
"- default:",
|
||||
"- return",
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "30985a629ade98c4fde5bf79a200bd2697dc9d9f..201c2f06d17d14e12c9861e2a94372fc41441178"
|
||||
"shas": "b4c5ae05e9993d2a8f9abcfa1b1a5e1ff4677aed..c14d55dd062dc340dde5986bd08c8b6aa1173023"
|
||||
}]
|
||||
|
@ -1,4 +1,46 @@
|
||||
[{
|
||||
"testCaseDescription": "go-selector-expressions-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"selector-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"selector-expressions.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/selector-expressions.go b/selector-expressions.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/selector-expressions.go",
|
||||
"+++ b/selector-expressions.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "2e1fbc3488b3a5250246698b500360fa5c6cfcf2..e42a971b5a20ca75eb3c72bde201c371aa234e47"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-selector-expressions-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
@ -7,16 +49,16 @@
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a[b][c]()' function call"
|
||||
"summary": "Added the 'a[b][c]()' function call in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -27,206 +69,19 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/selector-expressions.go b/selector-expressions.go",
|
||||
"index e69de29..7be43f2 100644",
|
||||
"index 79058077..8b4c745e 100644",
|
||||
"--- a/selector-expressions.go",
|
||||
"+++ b/selector-expressions.go",
|
||||
"@@ -0,0 +1 @@",
|
||||
"+a.b.c()"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "1b6e0feb56e5cdb7ad291617f2f0435417e65665..1cabbfb616bb7f16666511f145e8709354b162c1"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-selector-expressions-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"selector-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'x[y][z]()' function call"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a[b][c]()' function call"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a[b][c]()' function call"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a[b][c]()' function call"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"selector-expressions.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/selector-expressions.go b/selector-expressions.go",
|
||||
"index 7be43f2..4fa8605 100644",
|
||||
"--- a/selector-expressions.go",
|
||||
"+++ b/selector-expressions.go",
|
||||
"@@ -1 +1,3 @@",
|
||||
"+x.y.z()",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+a.b.c()",
|
||||
" a.b.c()"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "1cabbfb616bb7f16666511f145e8709354b162c1..9cd2e1fa67eaf8b7701eb693cbde0abf05a9acf2"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-selector-expressions-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"selector-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
2
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'x' identifier with the 'a' identifier in the a[b] subscript access"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
3
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
3
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'y' identifier with the 'b' identifier in the a[b] subscript access"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
6
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
6
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'z' identifier with the 'c' identifier in the a[b][c] subscript access"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"selector-expressions.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/selector-expressions.go b/selector-expressions.go",
|
||||
"index 4fa8605..2a586da 100644",
|
||||
"--- a/selector-expressions.go",
|
||||
"+++ b/selector-expressions.go",
|
||||
"@@ -1,3 +1,3 @@",
|
||||
"-x.y.z()",
|
||||
"+a.b.c()",
|
||||
" a.b.c()",
|
||||
" a.b.c()"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "9cd2e1fa67eaf8b7701eb693cbde0abf05a9acf2..87e2a67ff089313ce73948c33f5fed26678e69e6"
|
||||
"shas": "e42a971b5a20ca75eb3c72bde201c371aa234e47..aca59151a934c5b7d22a87aa964022b68a778cb1"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-selector-expressions-replacement-test",
|
||||
@ -238,81 +93,81 @@
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
2
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'a' identifier with the 'x' identifier in the x[y] subscript access"
|
||||
"summary": "Replaced the 'a' identifier with the 'x' identifier in the x[y] subscript access of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
3
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
4
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
3
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
4
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'b' identifier with the 'y' identifier in the x[y] subscript access"
|
||||
"summary": "Replaced the 'b' identifier with the 'y' identifier in the x[y] subscript access of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
6
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
6
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'c' identifier with the 'z' identifier in the x[y][z] subscript access"
|
||||
"summary": "Replaced the 'c' identifier with the 'z' identifier in the x[y][z] subscript access of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -323,17 +178,19 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/selector-expressions.go b/selector-expressions.go",
|
||||
"index 2a586da..4fa8605 100644",
|
||||
"index 8b4c745e..0e519e3e 100644",
|
||||
"--- a/selector-expressions.go",
|
||||
"+++ b/selector-expressions.go",
|
||||
"@@ -1,3 +1,3 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-a.b.c()",
|
||||
"+x.y.z()",
|
||||
" a.b.c()",
|
||||
" a.b.c()"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "87e2a67ff089313ce73948c33f5fed26678e69e6..8288366db7745d5e945597239e1e3e9e7384f986"
|
||||
"shas": "aca59151a934c5b7d22a87aa964022b68a778cb1..dc7fcc07a9355e4a2ec338447082958991a735e2"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-selector-expressions-delete-replacement-test",
|
||||
@ -342,48 +199,84 @@
|
||||
"selector-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
8
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'x[y][z]()' function call"
|
||||
"summary": "Replaced the 'x' identifier with the 'a' identifier in the a[b] subscript access of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
8
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
3
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
4
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
3
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
4
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'a[b][c]()' function call"
|
||||
"summary": "Replaced the 'y' identifier with the 'b' identifier in the a[b] subscript access of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
8
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
6
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
6
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Added the 'x[y][z]()' function call"
|
||||
"summary": "Replaced the 'z' identifier with the 'c' identifier in the a[b][c] subscript access of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -394,67 +287,39 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/selector-expressions.go b/selector-expressions.go",
|
||||
"index 4fa8605..3e2d0bd 100644",
|
||||
"index 0e519e3e..8b4c745e 100644",
|
||||
"--- a/selector-expressions.go",
|
||||
"+++ b/selector-expressions.go",
|
||||
"@@ -1,3 +1,2 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-x.y.z()",
|
||||
"-a.b.c()",
|
||||
" a.b.c()",
|
||||
"+x.y.z()"
|
||||
"+a.b.c()",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "8288366db7745d5e945597239e1e3e9e7384f986..6320cb015ad06170d57469ad6117980fcf530917"
|
||||
"shas": "dc7fcc07a9355e4a2ec338447082958991a735e2..7b10b01b498546d1d3e0e6c9b28fdfeb6a1087f7"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-selector-expressions-delete-test",
|
||||
"testCaseDescription": "go-selector-expressions-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"selector-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'x[y][z]()' function call"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a[b][c]()' function call"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'x[y][z]()' function call"
|
||||
"summary": "Deleted the 'a[b][c]()' function call in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -465,18 +330,22 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/selector-expressions.go b/selector-expressions.go",
|
||||
"index 3e2d0bd..00b9e7c 100644",
|
||||
"index 8b4c745e..79058077 100644",
|
||||
"--- a/selector-expressions.go",
|
||||
"+++ b/selector-expressions.go",
|
||||
"@@ -1,2 +1 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-a.b.c()",
|
||||
" x.y.z()"
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "6320cb015ad06170d57469ad6117980fcf530917..64072b885bd8b401823412418b0a634151fb012c"
|
||||
"shas": "7b10b01b498546d1d3e0e6c9b28fdfeb6a1087f7..a909f7c3616574addb8ffea18320f3bb8d50c85e"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-selector-expressions-delete-rest-test",
|
||||
"testCaseDescription": "go-selector-expressions-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"selector-expressions.go": [
|
||||
@ -488,12 +357,12 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
8
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'x[y][z]()' function call"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -504,12 +373,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/selector-expressions.go b/selector-expressions.go",
|
||||
"index 00b9e7c..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/selector-expressions.go",
|
||||
"+++ b/selector-expressions.go",
|
||||
"@@ -1 +0,0 @@",
|
||||
"-x.y.z()"
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "64072b885bd8b401823412418b0a634151fb012c..5e49cf8bc49a6acceee67258f44392614d3e2807"
|
||||
"shas": "a909f7c3616574addb8ffea18320f3bb8d50c85e..584515bfe655665166b3a9a5db100a4bd4ae398b"
|
||||
}]
|
||||
|
@ -1,4 +1,46 @@
|
||||
[{
|
||||
"testCaseDescription": "go-send-statements-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"send-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"send-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/send-statements.go b/send-statements.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/send-statements.go",
|
||||
"+++ b/send-statements.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "c6c8175bf350bd238c29e1300d79724e6acf5d8f..e9256862e31c38270d1bec9360c4dc47c10838ca"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-send-statements-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
@ -7,31 +49,16 @@
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'foo' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '5'"
|
||||
"summary": "Added the 'foo <- 5' send statement in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -42,179 +69,19 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/send-statements.go b/send-statements.go",
|
||||
"index e69de29..9df974c 100644",
|
||||
"index 79058077..5f327d16 100644",
|
||||
"--- a/send-statements.go",
|
||||
"+++ b/send-statements.go",
|
||||
"@@ -0,0 +1 @@",
|
||||
"+foo <- 5"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "7fd6dea031e26a02c1743a205dc1489a7e050468..0c3bf2eda05dc415465ee2ed1bfe6ac87a0d41bd"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-send-statements-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"send-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'bar' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '6'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
4
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'foo' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '5'"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"send-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/send-statements.go b/send-statements.go",
|
||||
"index 9df974c..de76cee 100644",
|
||||
"--- a/send-statements.go",
|
||||
"+++ b/send-statements.go",
|
||||
"@@ -1 +1,3 @@",
|
||||
"+bar <- 6",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+foo <- 5",
|
||||
" foo <- 5"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "0c3bf2eda05dc415465ee2ed1bfe6ac87a0d41bd..abab5451f999eab126c0ad6f1312d732537d1685"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-send-statements-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"send-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'bar' identifier with the 'foo' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
9
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
9
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '6' with '5'"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"send-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/send-statements.go b/send-statements.go",
|
||||
"index de76cee..d487575 100644",
|
||||
"--- a/send-statements.go",
|
||||
"+++ b/send-statements.go",
|
||||
"@@ -1,3 +1,3 @@",
|
||||
"-bar <- 6",
|
||||
"+foo <- 5",
|
||||
" foo <- 5",
|
||||
" foo <- 5"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "abab5451f999eab126c0ad6f1312d732537d1685..b88435c07e6bcc26a890ef52e2cc3a63b4ad2155"
|
||||
"shas": "e9256862e31c38270d1bec9360c4dc47c10838ca..4b8e19ec7308259990ef6868862ae26f9517c905"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-send-statements-replacement-test",
|
||||
@ -226,54 +93,54 @@
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
4
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
4
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'foo' identifier with the 'bar' identifier"
|
||||
"summary": "Replaced the 'foo' identifier with the 'bar' identifier in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
9
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
9
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '5' with '6'"
|
||||
"summary": "Replaced '5' with '6' in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -284,17 +151,19 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/send-statements.go b/send-statements.go",
|
||||
"index d487575..de76cee 100644",
|
||||
"index 5f327d16..3829478b 100644",
|
||||
"--- a/send-statements.go",
|
||||
"+++ b/send-statements.go",
|
||||
"@@ -1,3 +1,3 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-foo <- 5",
|
||||
"+bar <- 6",
|
||||
" foo <- 5",
|
||||
" foo <- 5"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "b88435c07e6bcc26a890ef52e2cc3a63b4ad2155..956a353953bd55204b2eb37fdc8727198208edc8"
|
||||
"shas": "4b8e19ec7308259990ef6868862ae26f9517c905..71f509fd773bfe971497f7dab87fbb8d5f286c14"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-send-statements-delete-replacement-test",
|
||||
@ -303,93 +172,57 @@
|
||||
"send-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
4
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
4
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'bar' identifier"
|
||||
"summary": "Replaced the 'bar' identifier with the 'foo' identifier in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
9
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
9
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
9
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted '6'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
4
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'foo' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '5'"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
4
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'bar' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '6'"
|
||||
"summary": "Replaced '6' with '5' in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -400,20 +233,65 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/send-statements.go b/send-statements.go",
|
||||
"index de76cee..65a1c23 100644",
|
||||
"index 3829478b..5f327d16 100644",
|
||||
"--- a/send-statements.go",
|
||||
"+++ b/send-statements.go",
|
||||
"@@ -1,3 +1,2 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-bar <- 6",
|
||||
"-foo <- 5",
|
||||
" foo <- 5",
|
||||
"+bar <- 6"
|
||||
"+foo <- 5",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "956a353953bd55204b2eb37fdc8727198208edc8..6640556f9db698688695109406ffbdb65d89e298"
|
||||
"shas": "71f509fd773bfe971497f7dab87fbb8d5f286c14..289dff55b2757ee11a20854ec6325e34f53dcb91"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-send-statements-delete-test",
|
||||
"testCaseDescription": "go-send-statements-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"send-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'foo <- 5' send statement in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"send-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/send-statements.go b/send-statements.go",
|
||||
"index 5f327d16..79058077 100644",
|
||||
"--- a/send-statements.go",
|
||||
"+++ b/send-statements.go",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-foo <- 5",
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "289dff55b2757ee11a20854ec6325e34f53dcb91..d2e4520caddff99d3bc5ba1e63f495a53a6e84d4"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-send-statements-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"send-statements.go": [
|
||||
@ -425,81 +303,12 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'foo' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '5'"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"send-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/send-statements.go b/send-statements.go",
|
||||
"index 65a1c23..bab29cb 100644",
|
||||
"--- a/send-statements.go",
|
||||
"+++ b/send-statements.go",
|
||||
"@@ -1,2 +1 @@",
|
||||
"-foo <- 5",
|
||||
" bar <- 6"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "6640556f9db698688695109406ffbdb65d89e298..bd1886ba3d3f3e1fde4b18c020b346d71883ee9e"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-send-statements-delete-rest-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"send-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'bar' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '6'"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -510,12 +319,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/send-statements.go b/send-statements.go",
|
||||
"index bab29cb..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/send-statements.go",
|
||||
"+++ b/send-statements.go",
|
||||
"@@ -1 +0,0 @@",
|
||||
"-bar <- 6"
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "bd1886ba3d3f3e1fde4b18c020b346d71883ee9e..927f995f9a27002e1694b5d3ce66a7dbbfda6720"
|
||||
"shas": "d2e4520caddff99d3bc5ba1e63f495a53a6e84d4..7f8d4e43555f3b5d3f723b58c0fbf874612c614f"
|
||||
}]
|
||||
|
@ -1,4 +1,46 @@
|
||||
[{
|
||||
"testCaseDescription": "go-short-var-declarations-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"short-var-declarations.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"short-var-declarations.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/short-var-declarations.go",
|
||||
"+++ b/short-var-declarations.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "6ccea258bd2125cbbe34266069b39fc47fe5d4e3..d86a797bca0743cdc0eb4671f5b3eb25921e46b5"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-short-var-declarations-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
@ -7,31 +49,31 @@
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' variable"
|
||||
"summary": "Added the 'a' var assignment in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' variable"
|
||||
"summary": "Added the 'b' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -42,233 +84,19 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
|
||||
"index e69de29..99b7041 100644",
|
||||
"index 79058077..4ca1ce37 100644",
|
||||
"--- a/short-var-declarations.go",
|
||||
"+++ b/short-var-declarations.go",
|
||||
"@@ -0,0 +1 @@",
|
||||
"+a, b := 1, 2"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "d77b70cb3981afaf807f3e56652ecd386101cb2b..923c4c5fcf1002927a78d428eefab190c7e2c730"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-short-var-declarations-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"short-var-declarations.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'x' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'y' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"short-var-declarations.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
|
||||
"index 99b7041..220aab8 100644",
|
||||
"--- a/short-var-declarations.go",
|
||||
"+++ b/short-var-declarations.go",
|
||||
"@@ -1 +1,3 @@",
|
||||
"+x, y := 3, 4",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+a, b := 1, 2",
|
||||
" a, b := 1, 2"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "923c4c5fcf1002927a78d428eefab190c7e2c730..62e0fff2590e53bca217d3b3fb46c7f6f86822c1"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-short-var-declarations-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"short-var-declarations.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
2
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'x' identifier with the 'a' identifier in the a variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
10
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
10
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '3' with '1' in the a variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'y' identifier with the 'b' identifier in the b variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
12
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
13
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
12
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
13
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '4' with '2' in the b variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"short-var-declarations.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
|
||||
"index 220aab8..96ba966 100644",
|
||||
"--- a/short-var-declarations.go",
|
||||
"+++ b/short-var-declarations.go",
|
||||
"@@ -1,3 +1,3 @@",
|
||||
"-x, y := 3, 4",
|
||||
"+a, b := 1, 2",
|
||||
" a, b := 1, 2",
|
||||
" a, b := 1, 2"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "62e0fff2590e53bca217d3b3fb46c7f6f86822c1..ca28a3beeb3b19e152ad702d5c8ba7d4abcb87e2"
|
||||
"shas": "d86a797bca0743cdc0eb4671f5b3eb25921e46b5..949f040e38e0adb5a87c9b9ea7c42568058a2b32"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-short-var-declarations-replacement-test",
|
||||
@ -280,108 +108,108 @@
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
2
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'a' identifier with the 'x' identifier in the x variable"
|
||||
"summary": "Replaced the 'a' identifier with the 'x' identifier in the x var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
10
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
10
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '1' with '3' in the x variable"
|
||||
"summary": "Replaced '1' with '3' in the x var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'b' identifier with the 'y' identifier in the y variable"
|
||||
"summary": "Replaced the 'b' identifier with the 'y' identifier in the y var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
12
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
13
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
12
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
13
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '2' with '4' in the y variable"
|
||||
"summary": "Replaced '2' with '4' in the y var assignment of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -392,17 +220,19 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
|
||||
"index 96ba966..220aab8 100644",
|
||||
"index 4ca1ce37..bbbf9372 100644",
|
||||
"--- a/short-var-declarations.go",
|
||||
"+++ b/short-var-declarations.go",
|
||||
"@@ -1,3 +1,3 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-a, b := 1, 2",
|
||||
"+x, y := 3, 4",
|
||||
" a, b := 1, 2",
|
||||
" a, b := 1, 2"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "ca28a3beeb3b19e152ad702d5c8ba7d4abcb87e2..601d4dd43130450c08e7e7b34bc3b35cd6df83cc"
|
||||
"shas": "949f040e38e0adb5a87c9b9ea7c42568058a2b32..cee7f55944490cc3fd074d9b92e033c52b44a036"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-short-var-declarations-delete-replacement-test",
|
||||
@ -411,93 +241,111 @@
|
||||
"short-var-declarations.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
13
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'x' variable"
|
||||
"summary": "Replaced the 'x' identifier with the 'a' identifier in the a var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
13
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
10
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
10
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'y' variable"
|
||||
"summary": "Replaced '3' with '1' in the a var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
13
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'a' variable"
|
||||
"summary": "Replaced the 'y' identifier with the 'b' identifier in the b var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
13
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
12
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
13
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
12
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
13
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'b' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'x' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'y' variable"
|
||||
"summary": "Replaced '4' with '2' in the b var assignment of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -508,20 +356,80 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
|
||||
"index 220aab8..53cb4ed 100644",
|
||||
"index bbbf9372..4ca1ce37 100644",
|
||||
"--- a/short-var-declarations.go",
|
||||
"+++ b/short-var-declarations.go",
|
||||
"@@ -1,3 +1,2 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-x, y := 3, 4",
|
||||
"-a, b := 1, 2",
|
||||
" a, b := 1, 2",
|
||||
"+x, y := 3, 4"
|
||||
"+a, b := 1, 2",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "601d4dd43130450c08e7e7b34bc3b35cd6df83cc..b494ce9f37460cdcc5f62dbf78571c0e1134ce60"
|
||||
"shas": "cee7f55944490cc3fd074d9b92e033c52b44a036..d8c62fa2d207d7d564ca6f2673d47a697ecea20e"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-short-var-declarations-delete-test",
|
||||
"testCaseDescription": "go-short-var-declarations-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"short-var-declarations.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a' var assignment in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"short-var-declarations.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
|
||||
"index 4ca1ce37..79058077 100644",
|
||||
"--- a/short-var-declarations.go",
|
||||
"+++ b/short-var-declarations.go",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-a, b := 1, 2",
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "d8c62fa2d207d7d564ca6f2673d47a697ecea20e..38ed1694da804c308df6058dd3cbc3c4c552418d"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-short-var-declarations-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"short-var-declarations.go": [
|
||||
@ -533,27 +441,12 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b' variable"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -564,66 +457,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
|
||||
"index 53cb4ed..9209ec7 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/short-var-declarations.go",
|
||||
"+++ b/short-var-declarations.go",
|
||||
"@@ -1,2 +1 @@",
|
||||
"-a, b := 1, 2",
|
||||
" x, y := 3, 4"
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "b494ce9f37460cdcc5f62dbf78571c0e1134ce60..6943eb4765b07143acf4bead143f4e9927d67e74"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-short-var-declarations-delete-rest-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"short-var-declarations.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'x' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'y' variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"short-var-declarations.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
|
||||
"index 9209ec7..e69de29 100644",
|
||||
"--- a/short-var-declarations.go",
|
||||
"+++ b/short-var-declarations.go",
|
||||
"@@ -1 +0,0 @@",
|
||||
"-x, y := 3, 4"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "6943eb4765b07143acf4bead143f4e9927d67e74..b47f159a4e69c481019748b1b4451ca5480b48ac"
|
||||
"shas": "38ed1694da804c308df6058dd3cbc3c4c552418d..20ca91d3f69487f7d530b334333fdfe2a3743e03"
|
||||
}]
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,46 @@
|
||||
[{
|
||||
"testCaseDescription": "go-slice-literals-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"slice-literals.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"slice-literals.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/slice-literals.go b/slice-literals.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/slice-literals.go",
|
||||
"+++ b/slice-literals.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "bd87198971225ff85fa587a26c2dd6deb8510b32..c9c6443b2e8022c659cd31c5d86aad9618c51688"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-slice-literals-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
@ -7,164 +49,46 @@
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
4,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
22
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 's1' variable"
|
||||
"summary": "Added the 's1' var assignment in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
5,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
26
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 's2' variable"
|
||||
"summary": "Added the 's2' var assignment in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 's3' variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"slice-literals.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/slice-literals.go b/slice-literals.go",
|
||||
"index e69de29..9b1eb7a 100644",
|
||||
"--- a/slice-literals.go",
|
||||
"+++ b/slice-literals.go",
|
||||
"@@ -0,0 +1,6 @@",
|
||||
"+const s1 = []string{}",
|
||||
"+const s2 = []string{\"hi\"}",
|
||||
"+const s3 = []string{",
|
||||
"+\"hi\",",
|
||||
"+ \"hello\",",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "d7c85b9aedcbd3af69fdfe6a30e249364113d5e2..e5b39d883ee5c4845c6e84d7c6edec4ba14c5057"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-slice-literals-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"slice-literals.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
27
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 's1' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
29
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 's2' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 's3' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
7,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
22
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 's1' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
8,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
26
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 's2' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
9,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
12,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 's3' variable"
|
||||
"summary": "Added the 's3' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -175,170 +99,24 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/slice-literals.go b/slice-literals.go",
|
||||
"index 9b1eb7a..4555163 100644",
|
||||
"index 79058077..3c94936e 100644",
|
||||
"--- a/slice-literals.go",
|
||||
"+++ b/slice-literals.go",
|
||||
"@@ -1,3 +1,15 @@",
|
||||
"+const s1 = []string{\"sup\"}",
|
||||
"+const s2 = []string{\"hello\"}",
|
||||
"+const s3 = []string{",
|
||||
"+\"bar\",",
|
||||
"+ \"baz\",",
|
||||
"+}",
|
||||
"@@ -1,5 +1,10 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+const s1 = []string{}",
|
||||
"+const s2 = []string{\"hi\"}",
|
||||
"+const s3 = []string{",
|
||||
"+\"hi\",",
|
||||
"+ \"hello\",",
|
||||
"+}",
|
||||
" const s1 = []string{}",
|
||||
" const s2 = []string{\"hi\"}",
|
||||
" const s3 = []string{"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "e5b39d883ee5c4845c6e84d7c6edec4ba14c5057..e92c35c4e9312dc3a6e804deda19c55347de6e06"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-slice-literals-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"slice-literals.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
21
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
26
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
20
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
22
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the \"sup\" string with the '{}' literal_value in the s1 variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
21
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
28
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
21
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
25
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the \"hello\" string with the \"hi\" string in the s2 variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
6
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the \"bar\" string with the \"hi\" string in the s3 variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
7
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
9
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the \"baz\" string with the \"hello\" string in the s3 variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"slice-literals.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/slice-literals.go b/slice-literals.go",
|
||||
"index 4555163..39a2067 100644",
|
||||
"--- a/slice-literals.go",
|
||||
"+++ b/slice-literals.go",
|
||||
"@@ -1,8 +1,8 @@",
|
||||
"-const s1 = []string{\"sup\"}",
|
||||
"-const s2 = []string{\"hello\"}",
|
||||
"+const s1 = []string{}",
|
||||
"+const s2 = []string{\"hi\"}",
|
||||
" const s3 = []string{",
|
||||
"-\"bar\",",
|
||||
"- \"baz\",",
|
||||
"+\"hi\",",
|
||||
"+ \"hello\",",
|
||||
" }",
|
||||
" const s1 = []string{}",
|
||||
" const s2 = []string{\"hi\"}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "e92c35c4e9312dc3a6e804deda19c55347de6e06..4d6e51e7ba29099b0b91915fb889af994eec1795"
|
||||
"shas": "c9c6443b2e8022c659cd31c5d86aad9618c51688..29fdb841b857fda14c6399b67fd61d23832f2e4f"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-slice-literals-replacement-test",
|
||||
@ -350,108 +128,108 @@
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
20
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
22
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
21
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
26
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the '{}' literal_value with the \"sup\" string in the s1 variable"
|
||||
"summary": "Replaced the '{}' literal with the \"sup\" string in the []string{\"sup\"} slice literal of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
21
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
25
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
21
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
28
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the \"hi\" string with the \"hello\" string in the s2 variable"
|
||||
"summary": "Replaced the \"hi\" string with the \"hello\" string in the []string{\"hello\"} slice literal of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
7,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
7,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
7,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
7,
|
||||
6
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the \"hi\" string with the \"bar\" string in the s3 variable"
|
||||
"summary": "Replaced the \"hi\" string with the \"bar\" string in the []string{\n\"bar\",\n \"baz\",\n} slice literal of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
8,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
8,
|
||||
9
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
8,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
8,
|
||||
7
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the \"hello\" string with the \"baz\" string in the s3 variable"
|
||||
"summary": "Replaced the \"hello\" string with the \"baz\" string in the []string{\n\"bar\",\n \"baz\",\n} slice literal of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -462,10 +240,13 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/slice-literals.go b/slice-literals.go",
|
||||
"index 39a2067..4555163 100644",
|
||||
"index 3c94936e..caefc004 100644",
|
||||
"--- a/slice-literals.go",
|
||||
"+++ b/slice-literals.go",
|
||||
"@@ -1,8 +1,8 @@",
|
||||
"@@ -1,10 +1,10 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-const s1 = []string{}",
|
||||
"-const s2 = []string{\"hi\"}",
|
||||
"+const s1 = []string{\"sup\"}",
|
||||
@ -476,11 +257,10 @@
|
||||
"+\"bar\",",
|
||||
"+ \"baz\",",
|
||||
" }",
|
||||
" const s1 = []string{}",
|
||||
" const s2 = []string{\"hi\"}"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "4d6e51e7ba29099b0b91915fb889af994eec1795..079faf0b3b47fde58866875a9a64813bc764950c"
|
||||
"shas": "29fdb841b857fda14c6399b67fd61d23832f2e4f..9f0128a9f93aea99042f33f76a6ac5c756959f2c"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-slice-literals-delete-replacement-test",
|
||||
@ -489,138 +269,111 @@
|
||||
"slice-literals.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
27
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
21
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
26
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
20
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
22
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 's1' variable"
|
||||
"summary": "Replaced the \"sup\" string with the '{}' literal in the []string{} slice literal of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
29
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
21
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
28
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
21
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
25
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 's2' variable"
|
||||
"summary": "Replaced the \"hello\" string with the \"hi\" string in the []string{\"hi\"} slice literal of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
2
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
7,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
6
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
7,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 's3' variable"
|
||||
"summary": "Replaced the \"bar\" string with the \"hi\" string in the []string{\n\"hi\",\n \"hello\",\n} slice literal of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
7,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
22
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
8,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
7
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
8,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
9
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 's1' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
8,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
26
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 's2' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
9,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
12,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 's3' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
7,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
27
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 's1' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
8,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
29
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 's2' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
9,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
12,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 's3' variable"
|
||||
"summary": "Replaced the \"baz\" string with the \"hello\" string in the []string{\n\"hi\",\n \"hello\",\n} slice literal of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -631,38 +384,30 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/slice-literals.go b/slice-literals.go",
|
||||
"index 4555163..d3fb29c 100644",
|
||||
"index caefc004..3c94936e 100644",
|
||||
"--- a/slice-literals.go",
|
||||
"+++ b/slice-literals.go",
|
||||
"@@ -1,18 +1,12 @@",
|
||||
"@@ -1,10 +1,10 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-const s1 = []string{\"sup\"}",
|
||||
"-const s2 = []string{\"hello\"}",
|
||||
"-const s3 = []string{",
|
||||
"+const s1 = []string{}",
|
||||
"+const s2 = []string{\"hi\"}",
|
||||
" const s3 = []string{",
|
||||
"-\"bar\",",
|
||||
"- \"baz\",",
|
||||
"-}",
|
||||
" const s1 = []string{}",
|
||||
" const s2 = []string{\"hi\"}",
|
||||
" const s3 = []string{",
|
||||
" \"hi\",",
|
||||
" \"hello\",",
|
||||
"+\"hi\",",
|
||||
"+ \"hello\",",
|
||||
" }",
|
||||
"-const s1 = []string{}",
|
||||
"-const s2 = []string{\"hi\"}",
|
||||
"+const s1 = []string{\"sup\"}",
|
||||
"+const s2 = []string{\"hello\"}",
|
||||
" const s3 = []string{",
|
||||
"-\"hi\",",
|
||||
"- \"hello\",",
|
||||
"+\"bar\",",
|
||||
"+ \"baz\",",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "079faf0b3b47fde58866875a9a64813bc764950c..705764c3224fe96e65bbb4e3ff1e8388e7219783"
|
||||
"shas": "9f0128a9f93aea99042f33f76a6ac5c756959f2c..777713eba10a1b4a80a2186b41cb42bfae652da8"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-slice-literals-delete-test",
|
||||
"testCaseDescription": "go-slice-literals-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"slice-literals.go": [
|
||||
@ -670,46 +415,46 @@
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
4,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
22
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 's1' variable"
|
||||
"summary": "Deleted the 's1' var assignment in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
5,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
26
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 's2' variable"
|
||||
"summary": "Deleted the 's2' var assignment in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
6,
|
||||
7
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
9,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 's3' variable"
|
||||
"summary": "Deleted the 's3' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -720,25 +465,27 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/slice-literals.go b/slice-literals.go",
|
||||
"index d3fb29c..e3fd378 100644",
|
||||
"index 3c94936e..79058077 100644",
|
||||
"--- a/slice-literals.go",
|
||||
"+++ b/slice-literals.go",
|
||||
"@@ -1,9 +1,3 @@",
|
||||
"@@ -1,10 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-const s1 = []string{}",
|
||||
"-const s2 = []string{\"hi\"}",
|
||||
"-const s3 = []string{",
|
||||
"-\"hi\",",
|
||||
"- \"hello\",",
|
||||
"-}",
|
||||
" const s1 = []string{\"sup\"}",
|
||||
" const s2 = []string{\"hello\"}",
|
||||
" const s3 = []string{"
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "705764c3224fe96e65bbb4e3ff1e8388e7219783..70be820be1a032a886aba1efaf386ea20e7e4636"
|
||||
"shas": "777713eba10a1b4a80a2186b41cb42bfae652da8..d57127d7aeb6bc75de7dbae9fda7cd75bb47f25f"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-slice-literals-delete-rest-test",
|
||||
"testCaseDescription": "go-slice-literals-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"slice-literals.go": [
|
||||
@ -749,43 +496,13 @@
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
27
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 's1' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
29
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 's2' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
2
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 's3' variable"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -796,17 +513,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/slice-literals.go b/slice-literals.go",
|
||||
"index e3fd378..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/slice-literals.go",
|
||||
"+++ b/slice-literals.go",
|
||||
"@@ -1,6 +0,0 @@",
|
||||
"-const s1 = []string{\"sup\"}",
|
||||
"-const s2 = []string{\"hello\"}",
|
||||
"-const s3 = []string{",
|
||||
"-\"bar\",",
|
||||
"- \"baz\",",
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "70be820be1a032a886aba1efaf386ea20e7e4636..0fff314fad0973ea89120a1ae3b7940e0f7866d2"
|
||||
"shas": "d57127d7aeb6bc75de7dbae9fda7cd75bb47f25f..99d38d0dd43a990f37c709b49fa2eae7137a4acc"
|
||||
}]
|
||||
|
@ -1,4 +1,46 @@
|
||||
[{
|
||||
"testCaseDescription": "go-slice-types-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"slice-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"slice-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/slice-types.go b/slice-types.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/slice-types.go",
|
||||
"+++ b/slice-types.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "311f299ee4b5dcd8c757aaf89a1230d369bda6e3..5b990ff2106f3abbc479873635bac339a21d6afb"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-slice-types-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
@ -7,61 +49,31 @@
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' identifier"
|
||||
"summary": "Added the 'a' type declaration in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'c' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
12
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'd' identifier"
|
||||
"summary": "Added the 'c' type declaration in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -72,252 +84,20 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/slice-types.go b/slice-types.go",
|
||||
"index e69de29..1b8dbe5 100644",
|
||||
"index 79058077..4880791f 100644",
|
||||
"--- a/slice-types.go",
|
||||
"+++ b/slice-types.go",
|
||||
"@@ -0,0 +1,2 @@",
|
||||
"+type a []b",
|
||||
"+type c [][]d"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "ecbb5b13e89407c4e715ccf67e358e5fc18fbfe6..bb07f330c30f729c34488c5177bdbfa1adcda009"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-slice-types-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"slice-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
12
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'p' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'c' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'y' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
4,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'c' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
4,
|
||||
12
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'd' identifier"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"slice-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/slice-types.go b/slice-types.go",
|
||||
"index 1b8dbe5..d718ee8 100644",
|
||||
"--- a/slice-types.go",
|
||||
"+++ b/slice-types.go",
|
||||
"@@ -1,2 +1,6 @@",
|
||||
"+type a [][]p",
|
||||
"+type c []y",
|
||||
"@@ -1,5 +1,6 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+type a []b",
|
||||
"+type c [][]d",
|
||||
" type a []b",
|
||||
" type c [][]d"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "bb07f330c30f729c34488c5177bdbfa1adcda009..d8a446f73da85de672759677f695a3604809776c"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-slice-types-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"slice-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
12
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'p' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
12
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'd' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'y' identifier"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"slice-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/slice-types.go b/slice-types.go",
|
||||
"index d718ee8..e6836eb 100644",
|
||||
"--- a/slice-types.go",
|
||||
"+++ b/slice-types.go",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
"-type a [][]p",
|
||||
"-type c []y",
|
||||
"+type a []b",
|
||||
"+type c [][]d",
|
||||
" type a []b",
|
||||
" type c [][]d",
|
||||
" type a []b"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "d8a446f73da85de672759677f695a3604809776c..10f227c053ced89f4057aa2b666319e8385c4ef1"
|
||||
"shas": "5b990ff2106f3abbc479873635bac339a21d6afb..0e862cac95a31a3480314af2809e1f175461c5fe"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-slice-types-replacement-test",
|
||||
@ -328,61 +108,61 @@
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
12
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'p' identifier"
|
||||
"summary": "Added the 'p' identifier in the 'a' type declaration of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b' identifier"
|
||||
"summary": "Deleted the 'b' identifier in the 'a' type declaration of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'y' identifier"
|
||||
"summary": "Added the 'y' identifier in the 'c' type declaration of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
12
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'd' identifier"
|
||||
"summary": "Deleted the 'd' identifier in the 'c' type declaration of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -393,20 +173,21 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/slice-types.go b/slice-types.go",
|
||||
"index e6836eb..d718ee8 100644",
|
||||
"index 4880791f..b48b280a 100644",
|
||||
"--- a/slice-types.go",
|
||||
"+++ b/slice-types.go",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
"@@ -1,6 +1,6 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-type a []b",
|
||||
"-type c [][]d",
|
||||
"+type a [][]p",
|
||||
"+type c []y",
|
||||
" type a []b",
|
||||
" type c [][]d",
|
||||
" type a []b"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "10f227c053ced89f4057aa2b666319e8385c4ef1..6a94a9051822b4344c1e02e1a4924d670f872acb"
|
||||
"shas": "0e862cac95a31a3480314af2809e1f175461c5fe..35cf4e9f2a798bf438bbbed46cd73c1d9ae3cd49"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-slice-types-delete-replacement-test",
|
||||
@ -415,108 +196,18 @@
|
||||
"slice-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
12
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'p' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'c' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
4,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
4,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'y' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'c' identifier"
|
||||
"summary": "Added the 'b' identifier in the 'a' type declaration of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
@ -531,67 +222,37 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'd' identifier"
|
||||
"summary": "Deleted the 'p' identifier in the 'a' type declaration of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
5,
|
||||
12
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
5,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'p' identifier"
|
||||
"summary": "Added the 'd' identifier in the 'c' type declaration of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'c' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
4,
|
||||
5,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
5,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'y' identifier"
|
||||
"summary": "Deleted the 'y' identifier in the 'c' type declaration of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -602,24 +263,24 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/slice-types.go b/slice-types.go",
|
||||
"index d718ee8..9f9c73f 100644",
|
||||
"index b48b280a..4880791f 100644",
|
||||
"--- a/slice-types.go",
|
||||
"+++ b/slice-types.go",
|
||||
"@@ -1,6 +1,4 @@",
|
||||
"@@ -1,6 +1,6 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-type a [][]p",
|
||||
"-type c []y",
|
||||
"-type a []b",
|
||||
"-type c [][]d",
|
||||
" type a []b",
|
||||
" type c [][]d",
|
||||
"+type a [][]p",
|
||||
"+type c []y"
|
||||
"+type a []b",
|
||||
"+type c [][]d",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "6a94a9051822b4344c1e02e1a4924d670f872acb..86ed7e6c1594c7c244da53bda19ab35fbe1a4431"
|
||||
"shas": "35cf4e9f2a798bf438bbbed46cd73c1d9ae3cd49..9e465999e8152c5cced37c02e235f8c3d9212832"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-slice-types-delete-test",
|
||||
"testCaseDescription": "go-slice-types-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"slice-types.go": [
|
||||
@ -627,61 +288,31 @@
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b' identifier"
|
||||
"summary": "Deleted the 'a' type declaration in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'c' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
12
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'd' identifier"
|
||||
"summary": "Deleted the 'c' type declaration in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -692,20 +323,23 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/slice-types.go b/slice-types.go",
|
||||
"index 9f9c73f..964a319 100644",
|
||||
"index 4880791f..79058077 100644",
|
||||
"--- a/slice-types.go",
|
||||
"+++ b/slice-types.go",
|
||||
"@@ -1,4 +1,2 @@",
|
||||
"@@ -1,6 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-type a []b",
|
||||
"-type c [][]d",
|
||||
" type a [][]p",
|
||||
" type c []y"
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "86ed7e6c1594c7c244da53bda19ab35fbe1a4431..86be4da43ace61e52cc61914cc60bed850f3c0cc"
|
||||
"shas": "9e465999e8152c5cced37c02e235f8c3d9212832..46775e18357ab321b7292332655630dcec7f44ec"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-slice-types-delete-rest-test",
|
||||
"testCaseDescription": "go-slice-types-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"slice-types.go": [
|
||||
@ -714,60 +348,15 @@
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
6
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
7
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
12
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'p' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'c' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
11
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'y' identifier"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -778,13 +367,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/slice-types.go b/slice-types.go",
|
||||
"index 964a319..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/slice-types.go",
|
||||
"+++ b/slice-types.go",
|
||||
"@@ -1,2 +0,0 @@",
|
||||
"-type a [][]p",
|
||||
"-type c []y"
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "86be4da43ace61e52cc61914cc60bed850f3c0cc..1e96ae060f06444539a3cfa853d7de2f58dd8eac"
|
||||
"shas": "46775e18357ab321b7292332655630dcec7f44ec..ecc6c1cfaa7cfdb57813875656d848f4eb240af1"
|
||||
}]
|
||||
|
@ -1,94 +1,50 @@
|
||||
[{
|
||||
"testCaseDescription": "go-string-literals-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"string-literals.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"string-literals.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/string-literals.go b/string-literals.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/string-literals.go",
|
||||
"+++ b/string-literals.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "29b7d780794e2ee8d37771310cebb2000b677aec..286e0bd256ddfafc7c560e9c2669787b66381d46"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-string-literals-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"string-literals.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"string-literals.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/string-literals.go b/string-literals.go",
|
||||
"index e69de29..90ac543 100644",
|
||||
"--- a/string-literals.go",
|
||||
"+++ b/string-literals.go",
|
||||
"@@ -0,0 +1,4 @@",
|
||||
"+const (",
|
||||
"+a = \"0\"",
|
||||
"+b = \"hello world\"",
|
||||
"+)"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "740c6c6b1390c86d2f179d9d31f010916292861a..9698847d1ada590968dad5fc427c1758590173f2"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-string-literals-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"string-literals.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
@ -97,27 +53,27 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
5,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' variable"
|
||||
"summary": "Added the 'a' var assignment in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
5,
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
6,
|
||||
18
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' variable"
|
||||
"summary": "Added the 'b' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -128,109 +84,22 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/string-literals.go b/string-literals.go",
|
||||
"index 90ac543..a781ce7 100644",
|
||||
"index 79058077..9a69966c 100644",
|
||||
"--- a/string-literals.go",
|
||||
"+++ b/string-literals.go",
|
||||
"@@ -1,4 +1,12 @@",
|
||||
" const (",
|
||||
"+a = \"2\"",
|
||||
"+b = \"hi\"",
|
||||
"+)",
|
||||
"@@ -1,5 +1,8 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+const (",
|
||||
"+a = \"0\"",
|
||||
"+b = \"hello world\"",
|
||||
"+)",
|
||||
"+const (",
|
||||
" a = \"0\"",
|
||||
" b = \"hello world\"",
|
||||
" )"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "9698847d1ada590968dad5fc427c1758590173f2..e8867a66d6757f4af01fd07689f3c8a879acdc80"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-string-literals-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"string-literals.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
8
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
8
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the \"2\" string with the \"0\" string in the a variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
9
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
18
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the \"hi\" string with the \"hello world\" string in the b variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"string-literals.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/string-literals.go b/string-literals.go",
|
||||
"index a781ce7..e7b83ba 100644",
|
||||
"--- a/string-literals.go",
|
||||
"+++ b/string-literals.go",
|
||||
"@@ -1,6 +1,6 @@",
|
||||
" const (",
|
||||
"-a = \"2\"",
|
||||
"-b = \"hi\"",
|
||||
"+a = \"0\"",
|
||||
"+b = \"hello world\"",
|
||||
" )",
|
||||
" const (",
|
||||
" a = \"0\""
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "e8867a66d6757f4af01fd07689f3c8a879acdc80..afb562067673bb91dc8df3e801ccb22827b8061e"
|
||||
"shas": "286e0bd256ddfafc7c560e9c2669787b66381d46..b8f816256c7413358be4f5ff760a9cd7d826b702"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-string-literals-replacement-test",
|
||||
@ -242,54 +111,54 @@
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
8
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
8
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the \"0\" string with the \"2\" string in the a variable"
|
||||
"summary": "Replaced the \"0\" string with the \"2\" string in the a var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
6,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
6,
|
||||
18
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
6,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
6,
|
||||
9
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the \"hello world\" string with the \"hi\" string in the b variable"
|
||||
"summary": "Replaced the \"hello world\" string with the \"hi\" string in the b var assignment of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -300,21 +169,22 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/string-literals.go b/string-literals.go",
|
||||
"index e7b83ba..a781ce7 100644",
|
||||
"index 9a69966c..fbbdb93e 100644",
|
||||
"--- a/string-literals.go",
|
||||
"+++ b/string-literals.go",
|
||||
"@@ -1,6 +1,6 @@",
|
||||
"@@ -2,7 +2,7 @@ package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
" const (",
|
||||
"-a = \"0\"",
|
||||
"-b = \"hello world\"",
|
||||
"+a = \"2\"",
|
||||
"+b = \"hi\"",
|
||||
" )",
|
||||
" const (",
|
||||
" a = \"0\""
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "afb562067673bb91dc8df3e801ccb22827b8061e..5345aa6a6eba226eb0cc8bce11c1073b3afea305"
|
||||
"shas": "b8f816256c7413358be4f5ff760a9cd7d826b702..00903da3545a103befa3655622e1b972f3da1a46"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-string-literals-delete-replacement-test",
|
||||
@ -323,93 +193,57 @@
|
||||
"string-literals.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
8
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
8
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'a' variable"
|
||||
"summary": "Replaced the \"2\" string with the \"0\" string in the a var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
9
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
18
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'b' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' variable"
|
||||
"summary": "Replaced the \"hi\" string with the \"hello world\" string in the b var assignment of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -420,30 +254,25 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/string-literals.go b/string-literals.go",
|
||||
"index a781ce7..38c651f 100644",
|
||||
"index fbbdb93e..9a69966c 100644",
|
||||
"--- a/string-literals.go",
|
||||
"+++ b/string-literals.go",
|
||||
"@@ -1,12 +1,8 @@",
|
||||
"@@ -2,7 +2,7 @@ package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
" const (",
|
||||
"-a = \"2\"",
|
||||
"-b = \"hi\"",
|
||||
"-)",
|
||||
"-const (",
|
||||
" a = \"0\"",
|
||||
" b = \"hello world\"",
|
||||
"+a = \"0\"",
|
||||
"+b = \"hello world\"",
|
||||
" )",
|
||||
" const (",
|
||||
"-a = \"0\"",
|
||||
"-b = \"hello world\"",
|
||||
"+a = \"2\"",
|
||||
"+b = \"hi\"",
|
||||
" )"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "5345aa6a6eba226eb0cc8bce11c1073b3afea305..38c2ea7acc57af4f85190210c284999e77853ab5"
|
||||
"shas": "00903da3545a103befa3655622e1b972f3da1a46..c1868273a476bcafa2067beb8a0b93f46627f003"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-string-literals-delete-test",
|
||||
"testCaseDescription": "go-string-literals-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"string-literals.go": [
|
||||
@ -451,31 +280,31 @@
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
5,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a' variable"
|
||||
"summary": "Deleted the 'a' var assignment in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
6,
|
||||
18
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b' variable"
|
||||
"summary": "Deleted the 'b' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -486,24 +315,25 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/string-literals.go b/string-literals.go",
|
||||
"index 38c651f..f70bc80 100644",
|
||||
"index 9a69966c..79058077 100644",
|
||||
"--- a/string-literals.go",
|
||||
"+++ b/string-literals.go",
|
||||
"@@ -1,8 +1,4 @@",
|
||||
" const (",
|
||||
"@@ -1,8 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-const (",
|
||||
"-a = \"0\"",
|
||||
"-b = \"hello world\"",
|
||||
"-)",
|
||||
"-const (",
|
||||
" a = \"2\"",
|
||||
" b = \"hi\"",
|
||||
" )"
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "38c2ea7acc57af4f85190210c284999e77853ab5..4fb5f349e5afea8321390fc01cd64c5e894a987c"
|
||||
"shas": "c1868273a476bcafa2067beb8a0b93f46627f003..e059052145abd6701de2673af30bfa861b2b3382"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-string-literals-delete-rest-test",
|
||||
"testCaseDescription": "go-string-literals-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"string-literals.go": [
|
||||
@ -515,27 +345,12 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b' variable"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -546,15 +361,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/string-literals.go b/string-literals.go",
|
||||
"index f70bc80..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/string-literals.go",
|
||||
"+++ b/string-literals.go",
|
||||
"@@ -1,4 +0,0 @@",
|
||||
"-const (",
|
||||
"-a = \"2\"",
|
||||
"-b = \"hi\"",
|
||||
"-)"
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "4fb5f349e5afea8321390fc01cd64c5e894a987c..d7c85b9aedcbd3af69fdfe6a30e249364113d5e2"
|
||||
"shas": "e059052145abd6701de2673af30bfa861b2b3382..bd87198971225ff85fa587a26c2dd6deb8510b32"
|
||||
}]
|
||||
|
286
test/corpus/diff-summaries/go/struct-field-declarations.json
Normal file
286
test/corpus/diff-summaries/go/struct-field-declarations.json
Normal file
@ -0,0 +1,286 @@
|
||||
[{
|
||||
"testCaseDescription": "go-struct-field-declarations-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"struct-field-declarations.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"struct-field-declarations.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/struct-field-declarations.go b/struct-field-declarations.go",
|
||||
"index e69de29b..60d13f45 100644",
|
||||
"--- a/struct-field-declarations.go",
|
||||
"+++ b/struct-field-declarations.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+ type s3 struct {} ",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "5deef7045822271505960ed4cec253dedf122c38..62f0f3e2454b8e3a44f76f779c28deb62c42fd62"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-struct-field-declarations-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"struct-field-declarations.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
5,
|
||||
3
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'g int' field declaration in the struct {\n g int\n} struct type of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"struct-field-declarations.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/struct-field-declarations.go b/struct-field-declarations.go",
|
||||
"index 60d13f45..bc84b146 100644",
|
||||
"--- a/struct-field-declarations.go",
|
||||
"+++ b/struct-field-declarations.go",
|
||||
"@@ -1,5 +1,7 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"- type s3 struct {} ",
|
||||
"+ type s3 struct {",
|
||||
"+ g int",
|
||||
"+} ",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "62f0f3e2454b8e3a44f76f779c28deb62c42fd62..03c576b5debd2c48337432cb2de75b1188457088"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-struct-field-declarations-replacement-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"struct-field-declarations.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
3
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
8
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
3
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
11
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'g int' field declaration with the 'h, i int' field declaration in the struct {\n h, i int\n} struct type of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"struct-field-declarations.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/struct-field-declarations.go b/struct-field-declarations.go",
|
||||
"index bc84b146..f3ca9a51 100644",
|
||||
"--- a/struct-field-declarations.go",
|
||||
"+++ b/struct-field-declarations.go",
|
||||
"@@ -2,6 +2,6 @@ package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
" type s3 struct {",
|
||||
"- g int",
|
||||
"+ h, i int",
|
||||
" } ",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "03c576b5debd2c48337432cb2de75b1188457088..b565b45f613603ee651612ec4f5015000d30e207"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-struct-field-declarations-delete-replacement-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"struct-field-declarations.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
3
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
11
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
3
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
8
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'h, i int' field declaration with the 'g int' field declaration in the struct {\n g int\n} struct type of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"struct-field-declarations.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/struct-field-declarations.go b/struct-field-declarations.go",
|
||||
"index f3ca9a51..bc84b146 100644",
|
||||
"--- a/struct-field-declarations.go",
|
||||
"+++ b/struct-field-declarations.go",
|
||||
"@@ -2,6 +2,6 @@ package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
" type s3 struct {",
|
||||
"- h, i int",
|
||||
"+ g int",
|
||||
" } ",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "b565b45f613603ee651612ec4f5015000d30e207..2276d09f9b7b1fa0729ea0fddcdfebff360c8f5d"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-struct-field-declarations-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"struct-field-declarations.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
5,
|
||||
3
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'g int' field declaration in the struct {} struct type of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"struct-field-declarations.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/struct-field-declarations.go b/struct-field-declarations.go",
|
||||
"index bc84b146..60d13f45 100644",
|
||||
"--- a/struct-field-declarations.go",
|
||||
"+++ b/struct-field-declarations.go",
|
||||
"@@ -1,7 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"- type s3 struct {",
|
||||
"- g int",
|
||||
"-} ",
|
||||
"+ type s3 struct {} ",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "2276d09f9b7b1fa0729ea0fddcdfebff360c8f5d..0e91f39b4267ac56153c02a6ce70ca1bd9e98919"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-struct-field-declarations-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"struct-field-declarations.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"struct-field-declarations.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/struct-field-declarations.go b/struct-field-declarations.go",
|
||||
"index 60d13f45..e69de29b 100644",
|
||||
"--- a/struct-field-declarations.go",
|
||||
"+++ b/struct-field-declarations.go",
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"- type s3 struct {} ",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "0e91f39b4267ac56153c02a6ce70ca1bd9e98919..2ff7aeec9c5efbeaf3a7b681f718640926ca1f90"
|
||||
}]
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,46 @@
|
||||
[{
|
||||
"testCaseDescription": "go-switch-statements-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"switch-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"switch-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/switch-statements.go b/switch-statements.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/switch-statements.go",
|
||||
"+++ b/switch-statements.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "f5fe5786c0b546d3a5a224d7b5875f31f57db459..97371be1b990d91b2ec115a8b644e29f3e8b87a5"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-switch-statements-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
@ -7,16 +49,16 @@
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
7,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'branch' switch statement"
|
||||
"summary": "Added a switch statement in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -27,273 +69,22 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/switch-statements.go b/switch-statements.go",
|
||||
"index e69de29..e444d1e 100644",
|
||||
"index 79058077..5cdd438b 100644",
|
||||
"--- a/switch-statements.go",
|
||||
"+++ b/switch-statements.go",
|
||||
"@@ -0,0 +1,4 @@",
|
||||
"+switch { case x < y: f1()",
|
||||
"+case x < z: g()",
|
||||
"+case x == 4: h()",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "25238a93bb3b92d4e2609c44f320e44fd9f4b537..fa7dbbfc36d0753d67461de33813be5492beefc2"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-switch-statements-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"switch-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'branch' switch statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'branch' switch statement"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"switch-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/switch-statements.go b/switch-statements.go",
|
||||
"index e444d1e..e2e5cf3 100644",
|
||||
"--- a/switch-statements.go",
|
||||
"+++ b/switch-statements.go",
|
||||
"@@ -1,3 +1,11 @@",
|
||||
"+switch { case a < b: f1()",
|
||||
"+case c < d: g()",
|
||||
"+case e == 4: f()",
|
||||
"+}",
|
||||
"@@ -1,5 +1,8 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+switch { case x < y: f1()",
|
||||
"+case x < z: g()",
|
||||
"+case x == 4: h()",
|
||||
"+}",
|
||||
" switch { case x < y: f1()",
|
||||
" case x < z: g()",
|
||||
" case x == 4: h()"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "fa7dbbfc36d0753d67461de33813be5492beefc2..f989edd6b885f1d71d4c0caa94c2f66647dd74d2"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-switch-statements-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"switch-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
15
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
16
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
15
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
16
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'a' identifier with the 'x' identifier in the 'branch' switch statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
19
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
20
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
19
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
20
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'b' identifier with the 'y' identifier in the 'branch' switch statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
7
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
7
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'c' identifier with the 'x' identifier in the 'branch' switch statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
11
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
11
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'd' identifier with the 'z' identifier in the 'branch' switch statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
7
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
7
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'e' identifier with the 'x' identifier in the 'branch' switch statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
14
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
15
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
14
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
15
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'f' identifier with the 'h' identifier in the h() function call"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"switch-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/switch-statements.go b/switch-statements.go",
|
||||
"index e2e5cf3..143707d 100644",
|
||||
"--- a/switch-statements.go",
|
||||
"+++ b/switch-statements.go",
|
||||
"@@ -1,6 +1,6 @@",
|
||||
"-switch { case a < b: f1()",
|
||||
"-case c < d: g()",
|
||||
"-case e == 4: f()",
|
||||
"+switch { case x < y: f1()",
|
||||
"+case x < z: g()",
|
||||
"+case x == 4: h()",
|
||||
" }",
|
||||
" switch { case x < y: f1()",
|
||||
" case x < z: g()"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "f989edd6b885f1d71d4c0caa94c2f66647dd74d2..573eec4554298c107f0fec98c9a0a9447e01419b"
|
||||
"shas": "97371be1b990d91b2ec115a8b644e29f3e8b87a5..49aad18e625ab33b2ed01a02b011d4343ba7e395"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-switch-statements-replacement-test",
|
||||
@ -305,162 +96,162 @@
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
15
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
16
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
15
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
16
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'x' identifier with the 'a' identifier in the 'branch' switch statement"
|
||||
"summary": "Replaced the 'x' identifier with the 'a' identifier in a switch statement of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
19
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
20
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
19
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
20
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'y' identifier with the 'b' identifier in the 'branch' switch statement"
|
||||
"summary": "Replaced the 'y' identifier with the 'b' identifier in a switch statement of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
7
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
7
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'x' identifier with the 'c' identifier in the 'branch' switch statement"
|
||||
"summary": "Replaced the 'x' identifier with the 'c' identifier in a switch statement of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
11
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
11
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'z' identifier with the 'd' identifier in the 'branch' switch statement"
|
||||
"summary": "Replaced the 'z' identifier with the 'd' identifier in a switch statement of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
6,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
6,
|
||||
7
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
6,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
6,
|
||||
7
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'x' identifier with the 'e' identifier in the 'branch' switch statement"
|
||||
"summary": "Replaced the 'x' identifier with the 'e' identifier in a switch statement of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
6,
|
||||
14
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
6,
|
||||
15
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
3,
|
||||
6,
|
||||
14
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
6,
|
||||
15
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'h' identifier with the 'f' identifier in the f() function call"
|
||||
"summary": "Replaced the 'h' identifier with the 'f' identifier in the f() function call of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -471,10 +262,13 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/switch-statements.go b/switch-statements.go",
|
||||
"index 143707d..e2e5cf3 100644",
|
||||
"index 5cdd438b..0b838937 100644",
|
||||
"--- a/switch-statements.go",
|
||||
"+++ b/switch-statements.go",
|
||||
"@@ -1,6 +1,6 @@",
|
||||
"@@ -1,8 +1,8 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-switch { case x < y: f1()",
|
||||
"-case x < z: g()",
|
||||
"-case x == 4: h()",
|
||||
@ -482,11 +276,10 @@
|
||||
"+case c < d: g()",
|
||||
"+case e == 4: f()",
|
||||
" }",
|
||||
" switch { case x < y: f1()",
|
||||
" case x < z: g()"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "573eec4554298c107f0fec98c9a0a9447e01419b..a5db4da268b58006496efe5e952f07dc3d2320db"
|
||||
"shas": "49aad18e625ab33b2ed01a02b011d4343ba7e395..3353e64f25a4b4a3b27eabe36f289b7ed2eefa85"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-switch-statements-delete-replacement-test",
|
||||
@ -495,48 +288,165 @@
|
||||
"switch-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
15
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
16
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
15
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
16
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'branch' switch statement"
|
||||
"summary": "Replaced the 'a' identifier with the 'x' identifier in a switch statement of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
19
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
20
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
19
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
20
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'branch' switch statement"
|
||||
"summary": "Replaced the 'b' identifier with the 'y' identifier in a switch statement of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
7
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
7
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Added the 'branch' switch statement"
|
||||
"summary": "Replaced the 'c' identifier with the 'x' identifier in a switch statement of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
11
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
11
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'd' identifier with the 'z' identifier in a switch statement of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
7
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
7
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'e' identifier with the 'x' identifier in a switch statement of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
14
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
15
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
6,
|
||||
14
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
15
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'f' identifier with the 'h' identifier in the h() function call of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -547,31 +457,27 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/switch-statements.go b/switch-statements.go",
|
||||
"index e2e5cf3..6989d28 100644",
|
||||
"index 0b838937..5cdd438b 100644",
|
||||
"--- a/switch-statements.go",
|
||||
"+++ b/switch-statements.go",
|
||||
"@@ -1,12 +1,8 @@",
|
||||
"@@ -1,8 +1,8 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-switch { case a < b: f1()",
|
||||
"-case c < d: g()",
|
||||
"-case e == 4: f()",
|
||||
"-}",
|
||||
" switch { case x < y: f1()",
|
||||
" case x < z: g()",
|
||||
" case x == 4: h()",
|
||||
"+switch { case x < y: f1()",
|
||||
"+case x < z: g()",
|
||||
"+case x == 4: h()",
|
||||
" }",
|
||||
"-switch { case x < y: f1()",
|
||||
"-case x < z: g()",
|
||||
"-case x == 4: h()",
|
||||
"+switch { case a < b: f1()",
|
||||
"+case c < d: g()",
|
||||
"+case e == 4: f()",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "a5db4da268b58006496efe5e952f07dc3d2320db..fd7487d4446fc6042d809a0cdb59deee1ff4ae04"
|
||||
"shas": "3353e64f25a4b4a3b27eabe36f289b7ed2eefa85..34bc509ec97b06440974346db573df7f8e93e7e0"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-switch-statements-delete-test",
|
||||
"testCaseDescription": "go-switch-statements-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"switch-statements.go": [
|
||||
@ -579,16 +485,16 @@
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
7,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'branch' switch statement"
|
||||
"summary": "Deleted a switch statement in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -599,23 +505,25 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/switch-statements.go b/switch-statements.go",
|
||||
"index 6989d28..eff174f 100644",
|
||||
"index 5cdd438b..79058077 100644",
|
||||
"--- a/switch-statements.go",
|
||||
"+++ b/switch-statements.go",
|
||||
"@@ -1,7 +1,3 @@",
|
||||
"@@ -1,8 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-switch { case x < y: f1()",
|
||||
"-case x < z: g()",
|
||||
"-case x == 4: h()",
|
||||
"-}",
|
||||
" switch { case a < b: f1()",
|
||||
" case c < d: g()",
|
||||
" case e == 4: f()"
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "fd7487d4446fc6042d809a0cdb59deee1ff4ae04..e98129fc667415197589dc420de58f3b3d2886fc"
|
||||
"shas": "34bc509ec97b06440974346db573df7f8e93e7e0..c292cdb6883c5306c7f7f46268333b01851ecdd8"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-switch-statements-delete-rest-test",
|
||||
"testCaseDescription": "go-switch-statements-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"switch-statements.go": [
|
||||
@ -627,12 +535,12 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'branch' switch statement"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -643,15 +551,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/switch-statements.go b/switch-statements.go",
|
||||
"index eff174f..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/switch-statements.go",
|
||||
"+++ b/switch-statements.go",
|
||||
"@@ -1,4 +0,0 @@",
|
||||
"-switch { case a < b: f1()",
|
||||
"-case c < d: g()",
|
||||
"-case e == 4: f()",
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "e98129fc667415197589dc420de58f3b3d2886fc..d0a9400c6fb3a520721068d06591be6dba11ccee"
|
||||
"shas": "c292cdb6883c5306c7f7f46268333b01851ecdd8..846045886cec5887a42533f48de771ee58d766a0"
|
||||
}]
|
||||
|
@ -1,4 +1,46 @@
|
||||
[{
|
||||
"testCaseDescription": "go-type-assertion-expressions-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"type-assertion-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"type-assertion-expressions.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/type-assertion-expressions.go b/type-assertion-expressions.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/type-assertion-expressions.go",
|
||||
"+++ b/type-assertion-expressions.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "e4c6a9b9a1f1cbf3dd7a4ce717333fb847b7fbac..494715cafe3834303fecb34caa2592d77712ab31"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-type-assertion-expressions-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
@ -7,16 +49,16 @@
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'x.(z.Person)' type assertion statement"
|
||||
"summary": "Added the 'x.(z.Person)' type assertion statement in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -27,206 +69,19 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/type-assertion-expressions.go b/type-assertion-expressions.go",
|
||||
"index e69de29..0765038 100644",
|
||||
"index 79058077..4f148f43 100644",
|
||||
"--- a/type-assertion-expressions.go",
|
||||
"+++ b/type-assertion-expressions.go",
|
||||
"@@ -0,0 +1 @@",
|
||||
"+x.(z.Person)"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "47d2e77075bea143df064341695111f434390787..012b1aebf2431d713e5287b10792aa564b72d6bc"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-type-assertion-expressions-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"type-assertion-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
10
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b.(c.Dog)' type assertion statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'x.(z.Person)' type assertion statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'x.(z.Person)' type assertion statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'x.(z.Person)' type assertion statement"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"type-assertion-expressions.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/type-assertion-expressions.go b/type-assertion-expressions.go",
|
||||
"index 0765038..56239fb 100644",
|
||||
"--- a/type-assertion-expressions.go",
|
||||
"+++ b/type-assertion-expressions.go",
|
||||
"@@ -1 +1,3 @@",
|
||||
"+b.(c.Dog)",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+x.(z.Person)",
|
||||
" x.(z.Person)"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "012b1aebf2431d713e5287b10792aa564b72d6bc..65901508a1a56b8fd65f1c704be9ebdb7c0e9962"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-type-assertion-expressions-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"type-assertion-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
2
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'b' identifier with the 'x' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'c' identifier with the 'z' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
9
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
12
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'Dog' identifier with the 'Person' identifier"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"type-assertion-expressions.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/type-assertion-expressions.go b/type-assertion-expressions.go",
|
||||
"index 56239fb..de94018 100644",
|
||||
"--- a/type-assertion-expressions.go",
|
||||
"+++ b/type-assertion-expressions.go",
|
||||
"@@ -1,3 +1,3 @@",
|
||||
"-b.(c.Dog)",
|
||||
"+x.(z.Person)",
|
||||
" x.(z.Person)",
|
||||
" x.(z.Person)"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "65901508a1a56b8fd65f1c704be9ebdb7c0e9962..cf149b0f32f8c6e2111d7e24f6384ef8a7465ed3"
|
||||
"shas": "494715cafe3834303fecb34caa2592d77712ab31..57a6ec4effeb9f05a122238d323ce7dcd69df07f"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-type-assertion-expressions-replacement-test",
|
||||
@ -238,81 +93,54 @@
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
2
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'x' identifier with the 'b' identifier"
|
||||
"summary": "Replaced the 'x' identifier with the 'b' identifier in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'z' identifier with the 'c' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
12
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
6
|
||||
4,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
9
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'Person' identifier with the 'Dog' identifier"
|
||||
"summary": "Replaced the 'z.Person' qualified identifier with the 'c.Dog' qualified identifier in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -323,17 +151,19 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/type-assertion-expressions.go b/type-assertion-expressions.go",
|
||||
"index de94018..56239fb 100644",
|
||||
"index 4f148f43..e7463b41 100644",
|
||||
"--- a/type-assertion-expressions.go",
|
||||
"+++ b/type-assertion-expressions.go",
|
||||
"@@ -1,3 +1,3 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-x.(z.Person)",
|
||||
"+b.(c.Dog)",
|
||||
" x.(z.Person)",
|
||||
" x.(z.Person)"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "cf149b0f32f8c6e2111d7e24f6384ef8a7465ed3..2785ff758a864fb059f1d3a640356184e685c7ae"
|
||||
"shas": "57a6ec4effeb9f05a122238d323ce7dcd69df07f..0316d3acd42da2101c8d933617d7eeb30eee52d5"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-type-assertion-expressions-delete-replacement-test",
|
||||
@ -342,48 +172,57 @@
|
||||
"type-assertion-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
10
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'b.(c.Dog)' type assertion statement"
|
||||
"summary": "Replaced the 'b' identifier with the 'x' identifier in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
13
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
9
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
12
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'x.(z.Person)' type assertion statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
10
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b.(c.Dog)' type assertion statement"
|
||||
"summary": "Replaced the 'c.Dog' qualified identifier with the 'z.Person' qualified identifier in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -394,67 +233,39 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/type-assertion-expressions.go b/type-assertion-expressions.go",
|
||||
"index 56239fb..aa7c34c 100644",
|
||||
"index e7463b41..4f148f43 100644",
|
||||
"--- a/type-assertion-expressions.go",
|
||||
"+++ b/type-assertion-expressions.go",
|
||||
"@@ -1,3 +1,2 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-b.(c.Dog)",
|
||||
"-x.(z.Person)",
|
||||
" x.(z.Person)",
|
||||
"+b.(c.Dog)"
|
||||
"+x.(z.Person)",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "2785ff758a864fb059f1d3a640356184e685c7ae..2747f7daa786f2a814e7e8381120d838050d1d89"
|
||||
"shas": "0316d3acd42da2101c8d933617d7eeb30eee52d5..f7e6434ce30a5b34a67cfe802722b1a51fd24052"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-type-assertion-expressions-delete-test",
|
||||
"testCaseDescription": "go-type-assertion-expressions-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"type-assertion-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
10
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b.(c.Dog)' type assertion statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'x.(z.Person)' type assertion statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
10
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b.(c.Dog)' type assertion statement"
|
||||
"summary": "Deleted the 'x.(z.Person)' type assertion statement in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -465,18 +276,22 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/type-assertion-expressions.go b/type-assertion-expressions.go",
|
||||
"index aa7c34c..093a081 100644",
|
||||
"index 4f148f43..79058077 100644",
|
||||
"--- a/type-assertion-expressions.go",
|
||||
"+++ b/type-assertion-expressions.go",
|
||||
"@@ -1,2 +1 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-x.(z.Person)",
|
||||
" b.(c.Dog)"
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "2747f7daa786f2a814e7e8381120d838050d1d89..f710680272400bb3cfcdca84cbc9a46dc3e136ba"
|
||||
"shas": "f7e6434ce30a5b34a67cfe802722b1a51fd24052..b4e4fd587390ce7fd5b4b6c95ac01261eb97c17c"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-type-assertion-expressions-delete-rest-test",
|
||||
"testCaseDescription": "go-type-assertion-expressions-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"type-assertion-expressions.go": [
|
||||
@ -488,12 +303,12 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
10
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b.(c.Dog)' type assertion statement"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -504,12 +319,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/type-assertion-expressions.go b/type-assertion-expressions.go",
|
||||
"index 093a081..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/type-assertion-expressions.go",
|
||||
"+++ b/type-assertion-expressions.go",
|
||||
"@@ -1 +0,0 @@",
|
||||
"-b.(c.Dog)"
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "f710680272400bb3cfcdca84cbc9a46dc3e136ba..aa6d103c0bde1c5cd7c122b6a597939f9920694d"
|
||||
"shas": "b4e4fd587390ce7fd5b4b6c95ac01261eb97c17c..d47123e6fd9c69b12607e0236be45289b764ce8b"
|
||||
}]
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,46 @@
|
||||
[{
|
||||
"testCaseDescription": "go-type-switch-statements-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"type-switch-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"type-switch-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/type-switch-statements.go b/type-switch-statements.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/type-switch-statements.go",
|
||||
"+++ b/type-switch-statements.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "846045886cec5887a42533f48de771ee58d766a0..4ff1c192d8ce792d43135c481bc6ac2038e9a75b"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-type-switch-statements-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
@ -7,16 +49,16 @@
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
9,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'e' switch statement"
|
||||
"summary": "Added the 'e' switch statement in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -27,140 +69,24 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/type-switch-statements.go b/type-switch-statements.go",
|
||||
"index e69de29..f353f0b 100644",
|
||||
"index 79058077..fd377c7a 100644",
|
||||
"--- a/type-switch-statements.go",
|
||||
"+++ b/type-switch-statements.go",
|
||||
"@@ -0,0 +1,6 @@",
|
||||
"+switch e.(type) {",
|
||||
"+ case []Person:",
|
||||
"+ a()",
|
||||
"+ case *Dog:",
|
||||
"+ break",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "d0a9400c6fb3a520721068d06591be6dba11ccee..a23aac7c9fe8328e6b75da50ba49937107ba5f13"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-type-switch-statements-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"type-switch-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' switch statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
7,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
12,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'e' switch statement"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"type-switch-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/type-switch-statements.go b/type-switch-statements.go",
|
||||
"index f353f0b..0c6eb84 100644",
|
||||
"--- a/type-switch-statements.go",
|
||||
"+++ b/type-switch-statements.go",
|
||||
"@@ -1,3 +1,15 @@",
|
||||
"+switch b.(type) {",
|
||||
"+ case []Person:",
|
||||
"+ a()",
|
||||
"+ case *Dog:",
|
||||
"+ break",
|
||||
"+}",
|
||||
"@@ -1,5 +1,10 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+switch e.(type) {",
|
||||
"+ case []Person:",
|
||||
"+ a()",
|
||||
"+ case *Dog:",
|
||||
"+ break",
|
||||
"+}",
|
||||
" switch e.(type) {",
|
||||
" case []Person:",
|
||||
" a()"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "a23aac7c9fe8328e6b75da50ba49937107ba5f13..a4d2458afbff43bdfdc321aa60d79fd3a9c7dd12"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-type-switch-statements-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"type-switch-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
9
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
9
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'b' identifier with the 'e' identifier in the 'e' switch statement"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"type-switch-statements.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/type-switch-statements.go b/type-switch-statements.go",
|
||||
"index 0c6eb84..b373d6d 100644",
|
||||
"--- a/type-switch-statements.go",
|
||||
"+++ b/type-switch-statements.go",
|
||||
"@@ -1,4 +1,4 @@",
|
||||
"-switch b.(type) {",
|
||||
"+switch e.(type) {",
|
||||
" case []Person:",
|
||||
" a()",
|
||||
" case *Dog:"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "a4d2458afbff43bdfdc321aa60d79fd3a9c7dd12..14d5cd3e4ef2783dc341266eb8c3d5b1aa4e38ec"
|
||||
"shas": "4ff1c192d8ce792d43135c481bc6ac2038e9a75b..4c5713dc076428d72a0468a2016d850ec4da21ff"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-type-switch-statements-replacement-test",
|
||||
@ -172,27 +98,27 @@
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
9
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
9
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'e' identifier with the 'b' identifier in the 'b' switch statement"
|
||||
"summary": "Replaced the 'e' identifier with the 'b' identifier in the 'b' switch statement of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -203,10 +129,13 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/type-switch-statements.go b/type-switch-statements.go",
|
||||
"index b373d6d..0c6eb84 100644",
|
||||
"index fd377c7a..f5ef4d87 100644",
|
||||
"--- a/type-switch-statements.go",
|
||||
"+++ b/type-switch-statements.go",
|
||||
"@@ -1,4 +1,4 @@",
|
||||
"@@ -1,7 +1,7 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-switch e.(type) {",
|
||||
"+switch b.(type) {",
|
||||
" case []Person:",
|
||||
@ -214,7 +143,7 @@
|
||||
" case *Dog:"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "14d5cd3e4ef2783dc341266eb8c3d5b1aa4e38ec..8e72f862af8f610979e789498e06f3c10ab247c0"
|
||||
"shas": "4c5713dc076428d72a0468a2016d850ec4da21ff..bb88efe8967423243277e2c5baf1ffa430e98601"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-type-switch-statements-delete-replacement-test",
|
||||
@ -223,48 +152,30 @@
|
||||
"type-switch-statements.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
2
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
9
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
9
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'b' switch statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
7,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
12,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'e' switch statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
7,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
12,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' switch statement"
|
||||
"summary": "Replaced the 'b' identifier with the 'e' identifier in the 'e' switch statement of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -275,33 +186,24 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/type-switch-statements.go b/type-switch-statements.go",
|
||||
"index 0c6eb84..64567d6 100644",
|
||||
"index f5ef4d87..fd377c7a 100644",
|
||||
"--- a/type-switch-statements.go",
|
||||
"+++ b/type-switch-statements.go",
|
||||
"@@ -1,16 +1,10 @@",
|
||||
"@@ -1,7 +1,7 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-switch b.(type) {",
|
||||
"- case []Person:",
|
||||
"- a()",
|
||||
"- case *Dog:",
|
||||
"- break",
|
||||
"-}",
|
||||
" switch e.(type) {",
|
||||
" case []Person:",
|
||||
" a()",
|
||||
" case *Dog:",
|
||||
" break",
|
||||
" }",
|
||||
"-switch e.(type) {",
|
||||
"+switch b.(type) {",
|
||||
"+switch e.(type) {",
|
||||
" case []Person:",
|
||||
" a()",
|
||||
" case *Dog:"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "8e72f862af8f610979e789498e06f3c10ab247c0..2da93d43c10edc4560f430395708b0a19deca7cf"
|
||||
"shas": "bb88efe8967423243277e2c5baf1ffa430e98601..3bec68c0b122bbb4ea1dbbf39abac06c3ae0ad07"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-type-switch-statements-delete-test",
|
||||
"testCaseDescription": "go-type-switch-statements-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"type-switch-statements.go": [
|
||||
@ -309,16 +211,16 @@
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
9,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'e' switch statement"
|
||||
"summary": "Deleted the 'e' switch statement in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -329,25 +231,27 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/type-switch-statements.go b/type-switch-statements.go",
|
||||
"index 64567d6..047534a 100644",
|
||||
"index fd377c7a..79058077 100644",
|
||||
"--- a/type-switch-statements.go",
|
||||
"+++ b/type-switch-statements.go",
|
||||
"@@ -1,9 +1,3 @@",
|
||||
"@@ -1,10 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-switch e.(type) {",
|
||||
"- case []Person:",
|
||||
"- a()",
|
||||
"- case *Dog:",
|
||||
"- break",
|
||||
"-}",
|
||||
" switch b.(type) {",
|
||||
" case []Person:",
|
||||
" a()"
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "2da93d43c10edc4560f430395708b0a19deca7cf..41efa01640ef05438abe68c7a166b50e79808f1c"
|
||||
"shas": "3bec68c0b122bbb4ea1dbbf39abac06c3ae0ad07..9497bebe3b0e4c555d273a7c99f0f0937a9c158b"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-type-switch-statements-delete-rest-test",
|
||||
"testCaseDescription": "go-type-switch-statements-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"type-switch-statements.go": [
|
||||
@ -360,11 +264,11 @@
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
2
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b' switch statement"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -375,17 +279,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/type-switch-statements.go b/type-switch-statements.go",
|
||||
"index 047534a..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/type-switch-statements.go",
|
||||
"+++ b/type-switch-statements.go",
|
||||
"@@ -1,6 +0,0 @@",
|
||||
"-switch b.(type) {",
|
||||
"- case []Person:",
|
||||
"- a()",
|
||||
"- case *Dog:",
|
||||
"- break",
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "41efa01640ef05438abe68c7a166b50e79808f1c..c02f9252b66f4d334e7e4d5cc2b56665c5d0b45f"
|
||||
"shas": "9497bebe3b0e4c555d273a7c99f0f0937a9c158b..5ef8bc0eb6c5afcf5b71c3773b50aacebffe32d5"
|
||||
}]
|
||||
|
@ -1,151 +1,79 @@
|
||||
[{
|
||||
"testCaseDescription": "go-unary-expressions-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"unary-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"unary-expressions.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/unary-expressions.go b/unary-expressions.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/unary-expressions.go",
|
||||
"+++ b/unary-expressions.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "17539bd3043b11a2ee479a191c1a1b3c10116161..95d724a0a09fadc48ea2890dee7d75ac5b9aa7af"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-unary-expressions-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"unary-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
5
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'foo()' function call"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"unary-expressions.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/unary-expressions.go b/unary-expressions.go",
|
||||
"index e69de29..858c09a 100644",
|
||||
"--- a/unary-expressions.go",
|
||||
"+++ b/unary-expressions.go",
|
||||
"@@ -0,0 +1,2 @@",
|
||||
"+!<-a",
|
||||
"+*foo()"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "0c22b7aa63a02fe2ddea7a2e3531e1bf778729a1..a853d892401554051aac78581481f205834001a0"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-unary-expressions-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"unary-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
5
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'bar()' function call"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
5
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
5
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
4,
|
||||
2
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
7
|
||||
5
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'foo()' function call"
|
||||
"summary": "Added the '!<-a' operator in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
5,
|
||||
4
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
5
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' identifier"
|
||||
"summary": "Added the '*foo()' operator in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -156,102 +84,20 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/unary-expressions.go b/unary-expressions.go",
|
||||
"index 858c09a..0b42f98 100644",
|
||||
"index 79058077..bdf9ccc5 100644",
|
||||
"--- a/unary-expressions.go",
|
||||
"+++ b/unary-expressions.go",
|
||||
"@@ -1,2 +1,6 @@",
|
||||
"+!<-b",
|
||||
"+*bar()",
|
||||
"@@ -1,5 +1,6 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+!<-a",
|
||||
"+*foo()",
|
||||
" !<-a",
|
||||
" *foo()"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "a853d892401554051aac78581481f205834001a0..bad62bb53ba866eebb82de0daba4d2af96bada50"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-unary-expressions-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"unary-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'b' identifier with the 'a' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'bar' identifier with the 'foo' identifier in the foo() function call"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"unary-expressions.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/unary-expressions.go b/unary-expressions.go",
|
||||
"index 0b42f98..25afb46 100644",
|
||||
"--- a/unary-expressions.go",
|
||||
"+++ b/unary-expressions.go",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
"-!<-b",
|
||||
"-*bar()",
|
||||
"+!<-a",
|
||||
"+*foo()",
|
||||
" !<-a",
|
||||
" *foo()",
|
||||
" !<-a"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "bad62bb53ba866eebb82de0daba4d2af96bada50..b3d8517142703695ff4ae6bbbfdae7a8131d62e3"
|
||||
"shas": "95d724a0a09fadc48ea2890dee7d75ac5b9aa7af..a1314a7b82e8afb936c41bc2b1f8f7f6dea61f0a"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-unary-expressions-replacement-test",
|
||||
@ -263,54 +109,54 @@
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'a' identifier with the 'b' identifier"
|
||||
"summary": "Replaced the 'a' identifier with the 'b' identifier in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'foo' identifier with the 'bar' identifier in the bar() function call"
|
||||
"summary": "Replaced the 'foo' identifier with the 'bar' identifier in the bar() function call of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -321,20 +167,21 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/unary-expressions.go b/unary-expressions.go",
|
||||
"index 25afb46..0b42f98 100644",
|
||||
"index bdf9ccc5..cf8ed882 100644",
|
||||
"--- a/unary-expressions.go",
|
||||
"+++ b/unary-expressions.go",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
"@@ -1,6 +1,6 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-!<-a",
|
||||
"-*foo()",
|
||||
"+!<-b",
|
||||
"+*bar()",
|
||||
" !<-a",
|
||||
" *foo()",
|
||||
" !<-a"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "b3d8517142703695ff4ae6bbbfdae7a8131d62e3..851012d113a37b9c98e94b82cd1e32ebdc8be638"
|
||||
"shas": "a1314a7b82e8afb936c41bc2b1f8f7f6dea61f0a..fc3fe7fe5250957e38223499d73968baa410b221"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-unary-expressions-delete-replacement-test",
|
||||
@ -343,93 +190,57 @@
|
||||
"unary-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
5
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'b' identifier"
|
||||
"summary": "Replaced the 'b' identifier with the 'a' identifier in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
7
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'bar()' function call"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
5
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'foo()' function call"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
5
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
4,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'bar()' function call"
|
||||
"summary": "Replaced the 'bar' identifier with the 'foo' identifier in the foo() function call of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -440,86 +251,56 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/unary-expressions.go b/unary-expressions.go",
|
||||
"index 0b42f98..812fb68 100644",
|
||||
"index cf8ed882..bdf9ccc5 100644",
|
||||
"--- a/unary-expressions.go",
|
||||
"+++ b/unary-expressions.go",
|
||||
"@@ -1,6 +1,4 @@",
|
||||
"@@ -1,6 +1,6 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-!<-b",
|
||||
"-*bar()",
|
||||
"-!<-a",
|
||||
"-*foo()",
|
||||
" !<-a",
|
||||
" *foo()",
|
||||
"+!<-b",
|
||||
"+*bar()"
|
||||
"+!<-a",
|
||||
"+*foo()",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "851012d113a37b9c98e94b82cd1e32ebdc8be638..163450da5968971b4c4d6ee24b6ffc76e87ff860"
|
||||
"shas": "fc3fe7fe5250957e38223499d73968baa410b221..8432ee8db9ae0dc6e5b596495e564e1ead822991"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-unary-expressions-delete-test",
|
||||
"testCaseDescription": "go-unary-expressions-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"unary-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
4
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
5
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' identifier"
|
||||
"summary": "Deleted the '!<-a' operator in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
4
|
||||
5,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
5
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'foo()' function call"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
4
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
5
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b' identifier"
|
||||
"summary": "Deleted the '*foo()' operator in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -530,20 +311,23 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/unary-expressions.go b/unary-expressions.go",
|
||||
"index 812fb68..6da661d 100644",
|
||||
"index bdf9ccc5..79058077 100644",
|
||||
"--- a/unary-expressions.go",
|
||||
"+++ b/unary-expressions.go",
|
||||
"@@ -1,4 +1,2 @@",
|
||||
"@@ -1,6 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-!<-a",
|
||||
"-*foo()",
|
||||
" !<-b",
|
||||
" *bar()"
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "163450da5968971b4c4d6ee24b6ffc76e87ff860..f47634134cc46cd539cef45bcf6090feb116ebb9"
|
||||
"shas": "8432ee8db9ae0dc6e5b596495e564e1ead822991..22c7306ff2ebc9176ca41b89ca4020751157e748"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-unary-expressions-delete-rest-test",
|
||||
"testCaseDescription": "go-unary-expressions-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"unary-expressions.go": [
|
||||
@ -552,30 +336,15 @@
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
4
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
5
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'bar()' function call"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -586,13 +355,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/unary-expressions.go b/unary-expressions.go",
|
||||
"index 6da661d..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/unary-expressions.go",
|
||||
"+++ b/unary-expressions.go",
|
||||
"@@ -1,2 +0,0 @@",
|
||||
"-!<-b",
|
||||
"-*bar()"
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "f47634134cc46cd539cef45bcf6090feb116ebb9..e560ba24e6b3318aeaaa38fbba2567add6762706"
|
||||
"shas": "22c7306ff2ebc9176ca41b89ca4020751157e748..2f519cce92d26f6a9c43d21d062dc065afef2bbb"
|
||||
}]
|
||||
|
@ -1,4 +1,46 @@
|
||||
[{
|
||||
"testCaseDescription": "go-var-declarations-with-no-expressions-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"var-declarations-with-no-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"var-declarations-with-no-expressions.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/var-declarations-with-no-expressions.go",
|
||||
"+++ b/var-declarations-with-no-expressions.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "6f294740ad6a127c66874266a39c55d6f279067a..28fd7c1aac60275cc6e07250ce2bf9f7f2f34af8"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-var-declarations-with-no-expressions-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
@ -7,160 +49,46 @@
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
4,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
13
|
||||
4,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'zero' variable"
|
||||
"summary": "Added the 'zero' variable in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
5,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
20
|
||||
5,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'one' variable"
|
||||
"summary": "Added the 'one' variable in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
20
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'two' variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"var-declarations-with-no-expressions.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
|
||||
"index e69de29..f156385 100644",
|
||||
"--- a/var-declarations-with-no-expressions.go",
|
||||
"+++ b/var-declarations-with-no-expressions.go",
|
||||
"@@ -0,0 +1,2 @@",
|
||||
"+var zero int",
|
||||
"+var one, two uint64"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "934c5da727053121abad016b81bcf0c4b922d4a9..cfdfa4a251864bbaee89d4be2a5ba16eba0f98f8"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-var-declarations-with-no-expressions-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"var-declarations-with-no-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
5,
|
||||
10
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
16
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
16
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'c' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
5,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'zero' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
20
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'one' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
20
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'two' variable"
|
||||
"summary": "Added the 'two' variable in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -171,129 +99,20 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
|
||||
"index f156385..f696db9 100644",
|
||||
"index 79058077..fcdc3127 100644",
|
||||
"--- a/var-declarations-with-no-expressions.go",
|
||||
"+++ b/var-declarations-with-no-expressions.go",
|
||||
"@@ -1,2 +1,6 @@",
|
||||
"+var a int",
|
||||
"+var b, c uint64",
|
||||
"@@ -1,5 +1,6 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+var zero int",
|
||||
"+var one, two uint64",
|
||||
" var zero int",
|
||||
" var one, two uint64"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "cfdfa4a251864bbaee89d4be2a5ba16eba0f98f8..4af9f85b09daf7d4a3067911981a2cae680b660d"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-var-declarations-with-no-expressions-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"var-declarations-with-no-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
6
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
9
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'a' identifier with the 'zero' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
6
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
8
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'b' identifier with the 'one' identifier"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
9
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
13
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'c' identifier with the 'two' identifier"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"var-declarations-with-no-expressions.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
|
||||
"index f696db9..e5e3183 100644",
|
||||
"--- a/var-declarations-with-no-expressions.go",
|
||||
"+++ b/var-declarations-with-no-expressions.go",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
"-var a int",
|
||||
"-var b, c uint64",
|
||||
"+var zero int",
|
||||
"+var one, two uint64",
|
||||
" var zero int",
|
||||
" var one, two uint64",
|
||||
" var zero int"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "4af9f85b09daf7d4a3067911981a2cae680b660d..f6f49bc348b0a2c0217811c9c49e27e46d4e6eb8"
|
||||
"shas": "28fd7c1aac60275cc6e07250ce2bf9f7f2f34af8..94444d86a80c26e413cef05550efcfc2e5903dac"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-var-declarations-with-no-expressions-replacement-test",
|
||||
@ -305,81 +124,81 @@
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
9
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
6
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'zero' identifier with the 'a' identifier"
|
||||
"summary": "Replaced the 'zero' identifier with the 'a' identifier in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
8
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
6
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'one' identifier with the 'b' identifier"
|
||||
"summary": "Replaced the 'one' identifier with the 'b' identifier in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
13
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
9
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'two' identifier with the 'c' identifier"
|
||||
"summary": "Replaced the 'two' identifier with the 'c' identifier in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -390,20 +209,21 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
|
||||
"index e5e3183..f696db9 100644",
|
||||
"index fcdc3127..8aab74f1 100644",
|
||||
"--- a/var-declarations-with-no-expressions.go",
|
||||
"+++ b/var-declarations-with-no-expressions.go",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
"@@ -1,6 +1,6 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-var zero int",
|
||||
"-var one, two uint64",
|
||||
"+var a int",
|
||||
"+var b, c uint64",
|
||||
" var zero int",
|
||||
" var one, two uint64",
|
||||
" var zero int"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "f6f49bc348b0a2c0217811c9c49e27e46d4e6eb8..0f680098c076258ec348362f0f263dca661c617c"
|
||||
"shas": "94444d86a80c26e413cef05550efcfc2e5903dac..d18dd508ad93803291e3fef6826b53a24261361c"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-var-declarations-with-no-expressions-delete-replacement-test",
|
||||
@ -412,138 +232,84 @@
|
||||
"var-declarations-with-no-expressions.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
10
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
6
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
9
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'a' variable"
|
||||
"summary": "Replaced the 'a' identifier with the 'zero' identifier in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
16
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
6
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
8
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'b' variable"
|
||||
"summary": "Replaced the 'b' identifier with the 'one' identifier in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
16
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
8
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
9
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
13
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'c' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'zero' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
20
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'one' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
20
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'two' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
10
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
16
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
16
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'c' variable"
|
||||
"summary": "Replaced the 'c' identifier with the 'two' identifier in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -554,24 +320,24 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
|
||||
"index f696db9..137ee10 100644",
|
||||
"index 8aab74f1..fcdc3127 100644",
|
||||
"--- a/var-declarations-with-no-expressions.go",
|
||||
"+++ b/var-declarations-with-no-expressions.go",
|
||||
"@@ -1,6 +1,4 @@",
|
||||
"@@ -1,6 +1,6 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-var a int",
|
||||
"-var b, c uint64",
|
||||
"-var zero int",
|
||||
"-var one, two uint64",
|
||||
" var zero int",
|
||||
" var one, two uint64",
|
||||
"+var a int",
|
||||
"+var b, c uint64"
|
||||
"+var zero int",
|
||||
"+var one, two uint64",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "0f680098c076258ec348362f0f263dca661c617c..b91d6b8dacfdb7c32799fd65a844cd65f999e6f5"
|
||||
"shas": "d18dd508ad93803291e3fef6826b53a24261361c..cddc950eb862c4f5f4ef826268ce03055ef4941e"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-var-declarations-with-no-expressions-delete-test",
|
||||
"testCaseDescription": "go-var-declarations-with-no-expressions-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"var-declarations-with-no-expressions.go": [
|
||||
@ -579,46 +345,46 @@
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
4,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'zero' variable in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
5,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
8
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'one' variable in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
5,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'zero' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
20
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'one' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
20
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'two' variable"
|
||||
"summary": "Deleted the 'two' variable in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -629,20 +395,23 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
|
||||
"index 137ee10..443ec9e 100644",
|
||||
"index fcdc3127..79058077 100644",
|
||||
"--- a/var-declarations-with-no-expressions.go",
|
||||
"+++ b/var-declarations-with-no-expressions.go",
|
||||
"@@ -1,4 +1,2 @@",
|
||||
"@@ -1,6 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-var zero int",
|
||||
"-var one, two uint64",
|
||||
" var a int",
|
||||
" var b, c uint64"
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "b91d6b8dacfdb7c32799fd65a844cd65f999e6f5..7cbf36fbf74f4985dd2e5bc76f72956bd197f095"
|
||||
"shas": "cddc950eb862c4f5f4ef826268ce03055ef4941e..fca013c75804ecc36f13bf1bccee63f21c15119d"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-var-declarations-with-no-expressions-delete-rest-test",
|
||||
"testCaseDescription": "go-var-declarations-with-no-expressions-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"var-declarations-with-no-expressions.go": [
|
||||
@ -654,42 +423,12 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
10
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
16
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
16
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'c' variable"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -700,13 +439,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
|
||||
"index 443ec9e..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/var-declarations-with-no-expressions.go",
|
||||
"+++ b/var-declarations-with-no-expressions.go",
|
||||
"@@ -1,2 +0,0 @@",
|
||||
"-var a int",
|
||||
"-var b, c uint64"
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "7cbf36fbf74f4985dd2e5bc76f72956bd197f095..87119afd9d847041735cf640ecc066ad2804a85f"
|
||||
"shas": "fca013c75804ecc36f13bf1bccee63f21c15119d..784a2032a8b3f1926b4874446b0dc9672ace15be"
|
||||
}]
|
||||
|
@ -1,4 +1,46 @@
|
||||
[{
|
||||
"testCaseDescription": "go-var-declarations-with-types-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"var-declarations-with-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"var-declarations-with-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/var-declarations-with-types.go b/var-declarations-with-types.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/var-declarations-with-types.go",
|
||||
"+++ b/var-declarations-with-types.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "cf089a91e3b3b63ace66353bbce1bc27a3607561..f225c3b9f2b833487a893a9f56e607fdf52bad2b"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-var-declarations-with-types-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
@ -7,46 +49,46 @@
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
4,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
17
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'zero' variable"
|
||||
"summary": "Added the 'zero' var assignment in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
5,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
27
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'one' variable"
|
||||
"summary": "Added the 'one' var assignment in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
5,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
27
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'two' variable"
|
||||
"summary": "Added the 'two' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -57,243 +99,20 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/var-declarations-with-types.go b/var-declarations-with-types.go",
|
||||
"index e69de29..7fa0f78 100644",
|
||||
"index 79058077..d946c807 100644",
|
||||
"--- a/var-declarations-with-types.go",
|
||||
"+++ b/var-declarations-with-types.go",
|
||||
"@@ -0,0 +1,2 @@",
|
||||
"+var zero int = 0",
|
||||
"+var one, two uint64 = 1, 2"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "4a563a4637d1f4bf47f9b6b9f47ca5acba82bfd2..bc75245000d830f0cc014c444f3a68bca289ed0a"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-var-declarations-with-types-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"var-declarations-with-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
14
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
24
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
24
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'c' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
17
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'zero' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
27
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'one' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
27
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'two' variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"var-declarations-with-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/var-declarations-with-types.go b/var-declarations-with-types.go",
|
||||
"index 7fa0f78..bf0a293 100644",
|
||||
"--- a/var-declarations-with-types.go",
|
||||
"+++ b/var-declarations-with-types.go",
|
||||
"@@ -1,2 +1,6 @@",
|
||||
"+var a int = 0",
|
||||
"+ var b, c uint64 = 1, 2",
|
||||
"@@ -1,5 +1,6 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+var zero int = 0",
|
||||
"+var one, two uint64 = 1, 2",
|
||||
" var zero int = 0",
|
||||
" var one, two uint64 = 1, 2"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "bc75245000d830f0cc014c444f3a68bca289ed0a..a9f4cd4a5019134807cf1f82ff1b74b7e90bdc50"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-var-declarations-with-types-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"var-declarations-with-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
6
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
9
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'a' identifier with the 'zero' identifier in the zero variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
7
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
8
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'b' identifier with the 'one' identifier in the one variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
10
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
13
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'c' identifier with the 'two' identifier in the two variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"var-declarations-with-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/var-declarations-with-types.go b/var-declarations-with-types.go",
|
||||
"index bf0a293..cba22b9 100644",
|
||||
"--- a/var-declarations-with-types.go",
|
||||
"+++ b/var-declarations-with-types.go",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
"-var a int = 0",
|
||||
"- var b, c uint64 = 1, 2",
|
||||
"+var zero int = 0",
|
||||
"+var one, two uint64 = 1, 2",
|
||||
" var zero int = 0",
|
||||
" var one, two uint64 = 1, 2",
|
||||
" var zero int = 0"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "a9f4cd4a5019134807cf1f82ff1b74b7e90bdc50..fddf3c784f6c2d1a53c3e3c6de720822d0e90f2a"
|
||||
"shas": "f225c3b9f2b833487a893a9f56e607fdf52bad2b..c00515e4efbd5f7d6912816d717ce1bfcb670bd0"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-var-declarations-with-types-replacement-test",
|
||||
@ -305,81 +124,81 @@
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
9
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
6
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'zero' identifier with the 'a' identifier in the a variable"
|
||||
"summary": "Replaced the 'zero' identifier with the 'a' identifier in the a var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
8
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
7
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'one' identifier with the 'b' identifier in the b variable"
|
||||
"summary": "Replaced the 'one' identifier with the 'b' identifier in the b var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
13
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
5,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
10
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'two' identifier with the 'c' identifier in the c variable"
|
||||
"summary": "Replaced the 'two' identifier with the 'c' identifier in the c var assignment of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -390,20 +209,21 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/var-declarations-with-types.go b/var-declarations-with-types.go",
|
||||
"index cba22b9..bf0a293 100644",
|
||||
"index d946c807..14683f6f 100644",
|
||||
"--- a/var-declarations-with-types.go",
|
||||
"+++ b/var-declarations-with-types.go",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
"@@ -1,6 +1,6 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-var zero int = 0",
|
||||
"-var one, two uint64 = 1, 2",
|
||||
"+var a int = 0",
|
||||
"+ var b, c uint64 = 1, 2",
|
||||
" var zero int = 0",
|
||||
" var one, two uint64 = 1, 2",
|
||||
" var zero int = 0"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "fddf3c784f6c2d1a53c3e3c6de720822d0e90f2a..873d8bbf42f8e863405179f45fd270a05f58baaf"
|
||||
"shas": "c00515e4efbd5f7d6912816d717ce1bfcb670bd0..8fb77729dcda7f53596574e17001bb7ec2d20396"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-var-declarations-with-types-delete-replacement-test",
|
||||
@ -412,138 +232,84 @@
|
||||
"var-declarations-with-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
14
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
6
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
9
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'a' variable"
|
||||
"summary": "Replaced the 'a' identifier with the 'zero' identifier in the zero var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
24
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
6
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
7
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
8
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'b' variable"
|
||||
"summary": "Replaced the 'b' identifier with the 'one' identifier in the one var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
24
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
9
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
10
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
5,
|
||||
10
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
13
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'c' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
17
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'zero' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
27
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'one' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
4,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
27
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'two' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
14
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
4,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
24
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
4,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
24
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'c' variable"
|
||||
"summary": "Replaced the 'c' identifier with the 'two' identifier in the two var assignment of the 'main' function"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -554,24 +320,24 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/var-declarations-with-types.go b/var-declarations-with-types.go",
|
||||
"index bf0a293..bd11fef 100644",
|
||||
"index 14683f6f..d946c807 100644",
|
||||
"--- a/var-declarations-with-types.go",
|
||||
"+++ b/var-declarations-with-types.go",
|
||||
"@@ -1,6 +1,4 @@",
|
||||
"@@ -1,6 +1,6 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-var a int = 0",
|
||||
"- var b, c uint64 = 1, 2",
|
||||
"-var zero int = 0",
|
||||
"-var one, two uint64 = 1, 2",
|
||||
" var zero int = 0",
|
||||
" var one, two uint64 = 1, 2",
|
||||
"+var a int = 0",
|
||||
"+ var b, c uint64 = 1, 2"
|
||||
"+var zero int = 0",
|
||||
"+var one, two uint64 = 1, 2",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "873d8bbf42f8e863405179f45fd270a05f58baaf..5d08dfef677b002958c94324b95ecc118be2c1de"
|
||||
"shas": "8fb77729dcda7f53596574e17001bb7ec2d20396..21f55db94ef8f793a90580e51238d359719777c5"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-var-declarations-with-types-delete-test",
|
||||
"testCaseDescription": "go-var-declarations-with-types-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"var-declarations-with-types.go": [
|
||||
@ -579,46 +345,46 @@
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
4,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
17
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'zero' variable"
|
||||
"summary": "Deleted the 'zero' var assignment in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
5,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
27
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'one' variable"
|
||||
"summary": "Deleted the 'one' var assignment in the main function of the 'main' module"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
5,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
5,
|
||||
27
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'two' variable"
|
||||
"summary": "Deleted the 'two' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -629,20 +395,23 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/var-declarations-with-types.go b/var-declarations-with-types.go",
|
||||
"index bd11fef..6e0b7e7 100644",
|
||||
"index d946c807..79058077 100644",
|
||||
"--- a/var-declarations-with-types.go",
|
||||
"+++ b/var-declarations-with-types.go",
|
||||
"@@ -1,4 +1,2 @@",
|
||||
"@@ -1,6 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-var zero int = 0",
|
||||
"-var one, two uint64 = 1, 2",
|
||||
" var a int = 0",
|
||||
" var b, c uint64 = 1, 2"
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "5d08dfef677b002958c94324b95ecc118be2c1de..771cd9d7d33a80c0327a1ecf0aea69a1c0e8dd0e"
|
||||
"shas": "21f55db94ef8f793a90580e51238d359719777c5..03a9cd454081a8e6645d83610f7d4c2f4a4c967f"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-var-declarations-with-types-delete-rest-test",
|
||||
"testCaseDescription": "go-var-declarations-with-types-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"var-declarations-with-types.go": [
|
||||
@ -654,42 +423,12 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
14
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
24
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
2
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
24
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'c' variable"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -700,13 +439,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/var-declarations-with-types.go b/var-declarations-with-types.go",
|
||||
"index 6e0b7e7..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/var-declarations-with-types.go",
|
||||
"+++ b/var-declarations-with-types.go",
|
||||
"@@ -1,2 +0,0 @@",
|
||||
"-var a int = 0",
|
||||
"- var b, c uint64 = 1, 2"
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "771cd9d7d33a80c0327a1ecf0aea69a1c0e8dd0e..934c5da727053121abad016b81bcf0c4b922d4a9"
|
||||
"shas": "03a9cd454081a8e6645d83610f7d4c2f4a4c967f..6f294740ad6a127c66874266a39c55d6f279067a"
|
||||
}]
|
||||
|
@ -1,4 +1,46 @@
|
||||
[{
|
||||
"testCaseDescription": "go-var-declarations-without-types-setup-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"var-declarations-without-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
6,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"var-declarations-without-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/var-declarations-without-types.go b/var-declarations-without-types.go",
|
||||
"index e69de29b..79058077 100644",
|
||||
"--- a/var-declarations-without-types.go",
|
||||
"+++ b/var-declarations-without-types.go",
|
||||
"@@ -0,0 +1,5 @@",
|
||||
"+package main",
|
||||
"+",
|
||||
"+func main() {",
|
||||
"+",
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "0d1fc5e6274224d81271e5fc10b3dcd839d2c59e..4f349ef4ddc8d1d7deac3ed064c34755b0f4ed44"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-var-declarations-without-types-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
@ -7,16 +49,16 @@
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
4,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'zero' variable"
|
||||
"summary": "Added the 'zero' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -27,179 +69,19 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/var-declarations-without-types.go b/var-declarations-without-types.go",
|
||||
"index e69de29..8c7993a 100644",
|
||||
"index 79058077..64f60746 100644",
|
||||
"--- a/var-declarations-without-types.go",
|
||||
"+++ b/var-declarations-without-types.go",
|
||||
"@@ -0,0 +1 @@",
|
||||
"+var zero = 0"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "5352a466a13a8f3f02aa66c9a40c94ce75e0e613..9d6d497e69f31aa9df97506de0154a1e61f4d9e4"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-var-declarations-without-types-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"var-declarations-without-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
20
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'one' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
20
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'two' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'zero' variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"var-declarations-without-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/var-declarations-without-types.go b/var-declarations-without-types.go",
|
||||
"index 8c7993a..80fe8ba 100644",
|
||||
"--- a/var-declarations-without-types.go",
|
||||
"+++ b/var-declarations-without-types.go",
|
||||
"@@ -1 +1,3 @@",
|
||||
"+var one, two = 1, 2",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-",
|
||||
"+var zero = 0",
|
||||
" var zero = 0"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "9d6d497e69f31aa9df97506de0154a1e61f4d9e4..ea6ae7e686e42ad7362086e079769670ea10936f"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-var-declarations-without-types-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"var-declarations-without-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
8
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
9
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'one' identifier with the 'zero' identifier in the zero variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
16
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
17
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
12
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
13
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '1' with '0' in the zero variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
20
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'two' variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"var-declarations-without-types.go"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/var-declarations-without-types.go b/var-declarations-without-types.go",
|
||||
"index 80fe8ba..c4df5f9 100644",
|
||||
"--- a/var-declarations-without-types.go",
|
||||
"+++ b/var-declarations-without-types.go",
|
||||
"@@ -1,3 +1,3 @@",
|
||||
"-var one, two = 1, 2",
|
||||
"+var zero = 0",
|
||||
" var zero = 0",
|
||||
" var zero = 0"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "ea6ae7e686e42ad7362086e079769670ea10936f..1d7f81f8dedc3d055e53d2e148bc244fd223ba95"
|
||||
"shas": "4f349ef4ddc8d1d7deac3ed064c34755b0f4ed44..1d981614331bf437a9bb4f3a578dbdb8d3bb3c45"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-var-declarations-without-types-replacement-test",
|
||||
@ -211,69 +93,69 @@
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
9
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
8
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'zero' identifier with the 'one' identifier in the one variable"
|
||||
"summary": "Replaced the 'zero' identifier with the 'one' identifier in the one var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
12
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
13
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
4,
|
||||
16
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
17
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '0' with '1' in the one variable"
|
||||
"summary": "Replaced '0' with '1' in the one var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
4,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
20
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'two' variable"
|
||||
"summary": "Added the 'two' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -284,17 +166,19 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/var-declarations-without-types.go b/var-declarations-without-types.go",
|
||||
"index c4df5f9..80fe8ba 100644",
|
||||
"index 64f60746..88a72ee0 100644",
|
||||
"--- a/var-declarations-without-types.go",
|
||||
"+++ b/var-declarations-without-types.go",
|
||||
"@@ -1,3 +1,3 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-var zero = 0",
|
||||
"+var one, two = 1, 2",
|
||||
" var zero = 0",
|
||||
" var zero = 0"
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "1d7f81f8dedc3d055e53d2e148bc244fd223ba95..9b622b9e582499d0adaf52cec95b949194138ebe"
|
||||
"shas": "1d981614331bf437a9bb4f3a578dbdb8d3bb3c45..7f5e7e4333182d20de657082c23e1853052b359f"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-var-declarations-without-types-delete-replacement-test",
|
||||
@ -303,78 +187,72 @@
|
||||
"var-declarations-without-types.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
20
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
8
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
9
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Deleted the 'one' variable"
|
||||
"summary": "Replaced the 'one' identifier with the 'zero' identifier in the zero var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
16
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
17
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
4,
|
||||
12
|
||||
],
|
||||
"end": [
|
||||
4,
|
||||
13
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '1' with '0' in the zero var assignment of the 'main' function"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
4,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
20
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'two' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'zero' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
20
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'one' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
20
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'two' variable"
|
||||
"summary": "Deleted the 'two' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -385,20 +263,22 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/var-declarations-without-types.go b/var-declarations-without-types.go",
|
||||
"index 80fe8ba..0d0b543 100644",
|
||||
"index 88a72ee0..64f60746 100644",
|
||||
"--- a/var-declarations-without-types.go",
|
||||
"+++ b/var-declarations-without-types.go",
|
||||
"@@ -1,3 +1,2 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-var one, two = 1, 2",
|
||||
"-var zero = 0",
|
||||
" var zero = 0",
|
||||
"+var one, two = 1, 2"
|
||||
"+var zero = 0",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "9b622b9e582499d0adaf52cec95b949194138ebe..34a7c384276ec72530b60e7c7b97e7cd26bf8292"
|
||||
"shas": "7f5e7e4333182d20de657082c23e1853052b359f..3d01fe832a3e6572514a45abe30ead81377a6e30"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-var-declarations-without-types-delete-test",
|
||||
"testCaseDescription": "go-var-declarations-without-types-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"var-declarations-without-types.go": [
|
||||
@ -406,16 +286,16 @@
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
4,
|
||||
5
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
4,
|
||||
13
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'zero' variable"
|
||||
"summary": "Deleted the 'zero' var assignment in the main function of the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -426,18 +306,22 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/var-declarations-without-types.go b/var-declarations-without-types.go",
|
||||
"index 0d0b543..c4a6ab5 100644",
|
||||
"index 64f60746..79058077 100644",
|
||||
"--- a/var-declarations-without-types.go",
|
||||
"+++ b/var-declarations-without-types.go",
|
||||
"@@ -1,2 +1 @@",
|
||||
"@@ -1,5 +1,5 @@",
|
||||
" package main",
|
||||
" ",
|
||||
" func main() {",
|
||||
"-var zero = 0",
|
||||
" var one, two = 1, 2"
|
||||
"+",
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "34a7c384276ec72530b60e7c7b97e7cd26bf8292..8ef765a217c5233472add0c29d15341458c4b793"
|
||||
"shas": "3d01fe832a3e6572514a45abe30ead81377a6e30..ecb8c963c2e5f9ac0cf79f8f75fd35a9df5edff3"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-var-declarations-without-types-delete-rest-test",
|
||||
"testCaseDescription": "go-var-declarations-without-types-teardown-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"var-declarations-without-types.go": [
|
||||
@ -449,27 +333,12 @@
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
20
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'one' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
20
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'two' variable"
|
||||
"summary": "Deleted the 'main' module"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -480,12 +349,16 @@
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/var-declarations-without-types.go b/var-declarations-without-types.go",
|
||||
"index c4a6ab5..e69de29 100644",
|
||||
"index 79058077..e69de29b 100644",
|
||||
"--- a/var-declarations-without-types.go",
|
||||
"+++ b/var-declarations-without-types.go",
|
||||
"@@ -1 +0,0 @@",
|
||||
"-var one, two = 1, 2"
|
||||
"@@ -1,5 +0,0 @@",
|
||||
"-package main",
|
||||
"-",
|
||||
"-func main() {",
|
||||
"-",
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"shas": "8ef765a217c5233472add0c29d15341458c4b793..4a563a4637d1f4bf47f9b6b9f47ca5acba82bfd2"
|
||||
"shas": "ecb8c963c2e5f9ac0cf79f8f75fd35a9df5edff3..cf089a91e3b3b63ace66353bbce1bc27a3607561"
|
||||
}]
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -34,7 +34,7 @@
|
||||
"+foo and bar"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "48bff6bf54e74bb5709add925c8101431133d29b..718a1f41b48403cdcb927be311af138014047e2a"
|
||||
"shas": "760d160893f207bd4480bd4cdbf9225479c045c8..7cc07c9bd56c68a9fd52504dc6c34e6097472cc7"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-and-or-replacement-insert-test",
|
||||
@ -105,7 +105,7 @@
|
||||
" foo and bar"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "718a1f41b48403cdcb927be311af138014047e2a..b7e04363c991e6a2cd1df38c5f20aa8e9ff7e337"
|
||||
"shas": "7cc07c9bd56c68a9fd52504dc6c34e6097472cc7..8f8ad308a601afec6fedb6a643c43f402355bc47"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-and-or-delete-insert-test",
|
||||
@ -174,7 +174,7 @@
|
||||
" foo and bar"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "b7e04363c991e6a2cd1df38c5f20aa8e9ff7e337..82a2a103e2f86084de0d80d198270d87f02eda63"
|
||||
"shas": "8f8ad308a601afec6fedb6a643c43f402355bc47..6fd584c9522117801bb5565763f5b16c9148d89c"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-and-or-replacement-test",
|
||||
@ -243,7 +243,7 @@
|
||||
" foo and bar"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "82a2a103e2f86084de0d80d198270d87f02eda63..d10ab6a75880a64eef54c3aa82d677def1938901"
|
||||
"shas": "6fd584c9522117801bb5565763f5b16c9148d89c..85540cf719adb2e06da1aaa2bdf7d65020cbafa0"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-and-or-delete-replacement-test",
|
||||
@ -285,7 +285,7 @@
|
||||
"-foo and bar"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "d10ab6a75880a64eef54c3aa82d677def1938901..f4fa4f7622bdfac02faa1feecd7993e7201467b2"
|
||||
"shas": "85540cf719adb2e06da1aaa2bdf7d65020cbafa0..ab50c272197758505577449e768972f0cdd5eb59"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-and-or-delete-test",
|
||||
@ -325,7 +325,7 @@
|
||||
" a or b and c"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "f4fa4f7622bdfac02faa1feecd7993e7201467b2..9971253676f78cad3cc69fd652b087501fb4c0bc"
|
||||
"shas": "ab50c272197758505577449e768972f0cdd5eb59..749204b420120020a89e45437c441208244effde"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-and-or-delete-rest-test",
|
||||
@ -379,5 +379,5 @@
|
||||
"-a or b and c"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "9971253676f78cad3cc69fd652b087501fb4c0bc..e29d844a20e10103ff1197d78c6639bba8fc6e8a"
|
||||
"shas": "749204b420120020a89e45437c441208244effde..276112ad3f93ee93fa30985c16b91d38d36f4e32"
|
||||
}]
|
||||
|
@ -34,7 +34,7 @@
|
||||
"+[ 1, 2, 3]"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "e8c4c9b4ba151237a0e88d5a650d34ee5a5a1b61..92505afbaea485d23aecf7f8edb66dfad7e17fd8"
|
||||
"shas": "c05b5a765cdcea2458b77acf718ccf2623e578fa..ca3a45216df04fc19cebe9e7c364f2030f022743"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-array-replacement-insert-test",
|
||||
@ -89,7 +89,7 @@
|
||||
" [ 1, 2, 3]"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "92505afbaea485d23aecf7f8edb66dfad7e17fd8..4f3473df5291027b89f3b4fe9ca1854e49454cc4"
|
||||
"shas": "ca3a45216df04fc19cebe9e7c364f2030f022743..d137cd075643c5f353f52bdab672a8fea7cde729"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-array-delete-insert-test",
|
||||
@ -205,7 +205,7 @@
|
||||
" [ 1, 2, 3]"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "4f3473df5291027b89f3b4fe9ca1854e49454cc4..9def16756eb5f54b2e6b55b6a4cdfeb4a8d5de46"
|
||||
"shas": "d137cd075643c5f353f52bdab672a8fea7cde729..e363bd7e7c5b9226206a1bc5c524b0043699c1af"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-array-replacement-test",
|
||||
@ -321,7 +321,7 @@
|
||||
" [ 1, 2, 3]"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "9def16756eb5f54b2e6b55b6a4cdfeb4a8d5de46..201d96f51f94a1a40acc9278b6adc775bea84b0f"
|
||||
"shas": "e363bd7e7c5b9226206a1bc5c524b0043699c1af..c25ee7443537fec8ed353826a56bca4112f68f29"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-array-delete-replacement-test",
|
||||
@ -392,7 +392,7 @@
|
||||
"+['a', 'b', 'c']"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "201d96f51f94a1a40acc9278b6adc775bea84b0f..b5284048ab1c80b398b60b7c632c733adde8df2e"
|
||||
"shas": "c25ee7443537fec8ed353826a56bca4112f68f29..bba78842632a40b370c116455d6cf638872706fd"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-array-delete-test",
|
||||
@ -431,7 +431,7 @@
|
||||
" ['a', 'b', 'c']"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "b5284048ab1c80b398b60b7c632c733adde8df2e..aff7086bf8fd3b7fc3be8f3bd49c41c46a049729"
|
||||
"shas": "bba78842632a40b370c116455d6cf638872706fd..71c9788146d44a877852a5a0b8340c540f967d70"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-array-delete-rest-test",
|
||||
@ -469,5 +469,5 @@
|
||||
"-['a', 'b', 'c']"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "aff7086bf8fd3b7fc3be8f3bd49c41c46a049729..79b196cace027a076f4ba235171fd4f409bdaba9"
|
||||
"shas": "71c9788146d44a877852a5a0b8340c540f967d70..793e1bdbe7ec874e9b83489ff39233476953a8f8"
|
||||
}]
|
||||
|
@ -34,7 +34,7 @@
|
||||
"+x = 0"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "4d0ef41f7debeacebe9a218e39bb2b48c8405446..ad5a90e438df179af24b1db62954dd57456ecb70"
|
||||
"shas": "62316f48f883c9c707459bcdd67ebcae15a231a8..939f7f330ea326f64067f76a43d129b407516427"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-assignment-replacement-insert-test",
|
||||
@ -89,7 +89,7 @@
|
||||
" x = 0"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "ad5a90e438df179af24b1db62954dd57456ecb70..91faac962a01a884edd6ada891ced7040d038ad4"
|
||||
"shas": "939f7f330ea326f64067f76a43d129b407516427..d13c7ef06478483af7b33662309f8a8ac7531259"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-assignment-delete-insert-test",
|
||||
@ -142,7 +142,7 @@
|
||||
" x = 0"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "91faac962a01a884edd6ada891ced7040d038ad4..9176406da7e16de7c17eddfbeb557a7441dcae6b"
|
||||
"shas": "d13c7ef06478483af7b33662309f8a8ac7531259..e6c370c9c3373f9585167e27a117b1c458f1f703"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-assignment-replacement-test",
|
||||
@ -195,7 +195,7 @@
|
||||
" x = 0"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "9176406da7e16de7c17eddfbeb557a7441dcae6b..781f04eca397646ee7614b9206aa7eff79a2e400"
|
||||
"shas": "e6c370c9c3373f9585167e27a117b1c458f1f703..a936b4450f977ef078cc2de08838b88e4b96cdfc"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-assignment-delete-replacement-test",
|
||||
@ -266,7 +266,7 @@
|
||||
"+x = 1"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "781f04eca397646ee7614b9206aa7eff79a2e400..75bccc3232c4b4773225c70ba35b08ba08e95d38"
|
||||
"shas": "a936b4450f977ef078cc2de08838b88e4b96cdfc..b90c9ecb1cbb7d92c59ef6f9abe73a1b609f237b"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-assignment-delete-test",
|
||||
@ -305,7 +305,7 @@
|
||||
" x = 1"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "75bccc3232c4b4773225c70ba35b08ba08e95d38..5dd9958c7bc7d5736ba816f77ce0a88f7b2fa709"
|
||||
"shas": "b90c9ecb1cbb7d92c59ef6f9abe73a1b609f237b..44af27381c5212148bd76e27261e7aa7de1b67c7"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-assignment-delete-rest-test",
|
||||
@ -343,5 +343,5 @@
|
||||
"-x = 1"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "5dd9958c7bc7d5736ba816f77ce0a88f7b2fa709..a07f2fef830bc79ffa2136025c4e29d5c8a0ff1b"
|
||||
"shas": "44af27381c5212148bd76e27261e7aa7de1b67c7..581df677d2a670ad93b167b548320511297d8332"
|
||||
}]
|
||||
|
@ -36,7 +36,7 @@
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "94ad2a55ec6e672dc0141d4eb140eac51505c3f3..607d6ab0c10829f932b4105f680cf2001e69400f"
|
||||
"shas": "585af1aa8a79718f22dd0fe0f8ac3051cfc56a4f..1f9ce3015ba7885c7ff5acb7420e9d240cb2ea5f"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-begin-block-replacement-insert-test",
|
||||
@ -113,7 +113,7 @@
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "607d6ab0c10829f932b4105f680cf2001e69400f..64af6701b22116fb4d3f49e6955735b9faccd69b"
|
||||
"shas": "1f9ce3015ba7885c7ff5acb7420e9d240cb2ea5f..60e77aa00dcbc7a636fd7749ad8be756d41bfe0f"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-begin-block-delete-insert-test",
|
||||
@ -187,7 +187,7 @@
|
||||
" foo"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "64af6701b22116fb4d3f49e6955735b9faccd69b..899324a7bdf43e1171bad9545e44238ef55a818f"
|
||||
"shas": "60e77aa00dcbc7a636fd7749ad8be756d41bfe0f..207946457ef222ec733ff1e0ce48dfd326fc3449"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-begin-block-replacement-test",
|
||||
@ -258,7 +258,7 @@
|
||||
" foo"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "899324a7bdf43e1171bad9545e44238ef55a818f..1df129cf1f0fbe27c7d05487a2e141a5b5ad02b4"
|
||||
"shas": "207946457ef222ec733ff1e0ce48dfd326fc3449..0a57164a8ecbfcf9d9390b1d4f9db9db7afae84b"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-begin-block-delete-replacement-test",
|
||||
@ -307,7 +307,7 @@
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "1df129cf1f0fbe27c7d05487a2e141a5b5ad02b4..ced5b35982c48d22ba622ed28fc36d14acdc31e2"
|
||||
"shas": "0a57164a8ecbfcf9d9390b1d4f9db9db7afae84b..8ce48cf274a6211aed53733945c0c9e3c3f08464"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-begin-block-delete-test",
|
||||
@ -350,7 +350,7 @@
|
||||
" bar"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "ced5b35982c48d22ba622ed28fc36d14acdc31e2..dea1fe3882582fbae56c5370051baf5d951ae2c3"
|
||||
"shas": "8ce48cf274a6211aed53733945c0c9e3c3f08464..d00df464924d84f60bdd896dad98c5b4af90e5d6"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-begin-block-delete-rest-test",
|
||||
@ -406,5 +406,5 @@
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "dea1fe3882582fbae56c5370051baf5d951ae2c3..82c6448a6e4e2d885ac6f12d9f86cdb1d6d1dd2d"
|
||||
"shas": "d00df464924d84f60bdd896dad98c5b4af90e5d6..bc59f083f15dede23c12c1777479b8f0ea372aaa"
|
||||
}]
|
||||
|
@ -35,7 +35,7 @@
|
||||
"+end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "72e1f4912f54a936266422abbb53a9c2fc864992..d9be702e11b41377baa2f5fb3ccd4e3cf3dd81e4"
|
||||
"shas": "166c92e7981b72600fa1e5096d0be628cc8d962c..41b6eb375409c26233ff4c19111e4760bd063764"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-begin-insert-test",
|
||||
@ -76,7 +76,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "d9be702e11b41377baa2f5fb3ccd4e3cf3dd81e4..1f7c992ecbf8dc5434ec7da2bc396e814e91adc9"
|
||||
"shas": "41b6eb375409c26233ff4c19111e4760bd063764..c348ec57e45ce7f68b908fd7298c56674e54714b"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-begin-replacement-test",
|
||||
@ -118,7 +118,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "1f7c992ecbf8dc5434ec7da2bc396e814e91adc9..a72bbedc16a6b300edf51b665ebaf90e62662ab8"
|
||||
"shas": "c348ec57e45ce7f68b908fd7298c56674e54714b..0ecb1ca4e9d2860498ed4f4a8f28f85bbd7cbc75"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-begin-delete-replacement-test",
|
||||
@ -160,7 +160,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "a72bbedc16a6b300edf51b665ebaf90e62662ab8..4ba57f34c39daab00f1b9fc48f1e162ced2e9a44"
|
||||
"shas": "0ecb1ca4e9d2860498ed4f4a8f28f85bbd7cbc75..d762f1123fa8127435ea014647e7d06cde5b7ba9"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-begin-delete-insert-test",
|
||||
@ -201,7 +201,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "4ba57f34c39daab00f1b9fc48f1e162ced2e9a44..9995f52897de0441895de23887b80cd4c9b7ea75"
|
||||
"shas": "d762f1123fa8127435ea014647e7d06cde5b7ba9..7d7d7f470bf35e7bfe2745ff858c712ac806808f"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-begin-teardown-test",
|
||||
@ -240,5 +240,5 @@
|
||||
"-end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "9995f52897de0441895de23887b80cd4c9b7ea75..cc81318f97e858789ab75eb6e9c4a9ef9a96807c"
|
||||
"shas": "7d7d7f470bf35e7bfe2745ff858c712ac806808f..5127fe99b505deff8beb2b738a1225eaaaee825f"
|
||||
}]
|
||||
|
@ -66,7 +66,7 @@
|
||||
"+a ^ b"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "f7475f092fd81593aab4939187efba0e1a894cc6..1fb1f51718a4b8ddf240e498b79dd574de91f7ee"
|
||||
"shas": "b8665811d4bea5d475c83e70b2b135910cd12238..51050871556d52452a2782271ef63e8f550c89ee"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-bitwise-operator-replacement-insert-test",
|
||||
@ -171,28 +171,13 @@
|
||||
" a ^ b"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "1fb1f51718a4b8ddf240e498b79dd574de91f7ee..6aedb1ce3a8797ff587dd8ab390fd0ce6aeb0d47"
|
||||
"shas": "51050871556d52452a2782271ef63e8f550c89ee..525c2ebbda4beec1568f6c63bcbc039015272f9b"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-bitwise-operator-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"bitwise-operator.rb": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
6
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a | b' binary statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
@ -208,17 +193,32 @@
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
2,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
7
|
||||
1,
|
||||
6
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced the 'a & b' binary statement with the 'a >> b' binary statement"
|
||||
"summary": "Replaced the 'a & b' binary statement with the 'a | b' binary statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
7
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'a >> b' binary statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
@ -270,7 +270,7 @@
|
||||
" a ^ b"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "6aedb1ce3a8797ff587dd8ab390fd0ce6aeb0d47..0549c1aa48fc56756472ca67726a9003416f9454"
|
||||
"shas": "525c2ebbda4beec1568f6c63bcbc039015272f9b..3f3039307a83f40f2d42d81ed6c23af08b7af6b6"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-bitwise-operator-replacement-test",
|
||||
@ -279,18 +279,30 @@
|
||||
"bitwise-operator.rb": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
6
|
||||
]
|
||||
}
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
6
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
6
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Added the 'a & b' binary statement"
|
||||
"summary": "Replaced the 'a | b' binary statement with the 'a & b' binary statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
@ -307,21 +319,6 @@
|
||||
},
|
||||
"summary": "Added the 'a << b' binary statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
6
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'a | b' binary statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
@ -375,7 +372,7 @@
|
||||
" a ^ b"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "0549c1aa48fc56756472ca67726a9003416f9454..8a618461620c18e9ea3a33b5b770de186e326ebc"
|
||||
"shas": "3f3039307a83f40f2d42d81ed6c23af08b7af6b6..42f190c590146436dafef1e62eb0fe176434c551"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-bitwise-operator-delete-replacement-test",
|
||||
@ -512,7 +509,7 @@
|
||||
"+a << b"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "8a618461620c18e9ea3a33b5b770de186e326ebc..a5688f715668b3db076f20ff3399d2bff365d1da"
|
||||
"shas": "42f190c590146436dafef1e62eb0fe176434c551..3276a2e36bef341d0571c6814b76584a31bac5ee"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-bitwise-operator-delete-test",
|
||||
@ -584,7 +581,7 @@
|
||||
" a << b"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "a5688f715668b3db076f20ff3399d2bff365d1da..67a9aacd2e7ce87b09f9e3772b7766c58e875edd"
|
||||
"shas": "3276a2e36bef341d0571c6814b76584a31bac5ee..5cfff4f62af8d8b7539061860316be445ccf73b8"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-bitwise-operator-delete-rest-test",
|
||||
@ -638,5 +635,5 @@
|
||||
"-a << b"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "67a9aacd2e7ce87b09f9e3772b7766c58e875edd..1965f9bdeebab8468bebb4f2c29230d3a42c255e"
|
||||
"shas": "5cfff4f62af8d8b7539061860316be445ccf73b8..c68e6c55ea690a0be0abc87e1c88965206d29d27"
|
||||
}]
|
||||
|
@ -34,7 +34,7 @@
|
||||
"+a || b"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "e29d844a20e10103ff1197d78c6639bba8fc6e8a..df14bb28f16cb2a1559a25f79ed0f828988ae3f1"
|
||||
"shas": "2412502f463a0cb9416638cc2da07ab2d024a52f..4329bba0adf3fda4dcf3a4495f2dcd94589d8daf"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-boolean-operator-replacement-insert-test",
|
||||
@ -89,7 +89,7 @@
|
||||
" a || b"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "df14bb28f16cb2a1559a25f79ed0f828988ae3f1..f5f5bd68d54c7d785cb8be9fa807e45b0edb3e49"
|
||||
"shas": "4329bba0adf3fda4dcf3a4495f2dcd94589d8daf..bc78661788a1988b9f04b3d8099943d40ccb6f1d"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-boolean-operator-delete-insert-test",
|
||||
@ -142,7 +142,7 @@
|
||||
" a || b"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "f5f5bd68d54c7d785cb8be9fa807e45b0edb3e49..b6258c7694077f26c384afdba0d38ff1c987c01e"
|
||||
"shas": "bc78661788a1988b9f04b3d8099943d40ccb6f1d..95eeb1dcc932d29956c3fc936ebc8df95b71d852"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-boolean-operator-replacement-test",
|
||||
@ -195,7 +195,7 @@
|
||||
" a || b"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "b6258c7694077f26c384afdba0d38ff1c987c01e..53428a8acedfee4c1f2f28b0c8b798fc74d5ae20"
|
||||
"shas": "95eeb1dcc932d29956c3fc936ebc8df95b71d852..4f08052b96e11f4c14730747195c1c92f2c7959d"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-boolean-operator-delete-replacement-test",
|
||||
@ -266,7 +266,7 @@
|
||||
"+a && b"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "53428a8acedfee4c1f2f28b0c8b798fc74d5ae20..11ad3b40423df923fb6260046df3bd83b3b2fc94"
|
||||
"shas": "4f08052b96e11f4c14730747195c1c92f2c7959d..baa0ce006152364fbccfc7f655e05adb539da733"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-boolean-operator-delete-test",
|
||||
@ -305,7 +305,7 @@
|
||||
" a && b"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "11ad3b40423df923fb6260046df3bd83b3b2fc94..1a515a532b8a07afeeedbdd56956bf3e6a4f4f57"
|
||||
"shas": "baa0ce006152364fbccfc7f655e05adb539da733..3a167415bc59515ec82cb809b236ca334af70bcd"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-boolean-operator-delete-rest-test",
|
||||
@ -343,5 +343,5 @@
|
||||
"-a && b"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "1a515a532b8a07afeeedbdd56956bf3e6a4f4f57..7c5058a233fff0a5b08a6fa3752565ecbdde40e5"
|
||||
"shas": "3a167415bc59515ec82cb809b236ca334af70bcd..5a6d083875f84d691932dcce0fc121fdc3a56264"
|
||||
}]
|
||||
|
@ -36,7 +36,7 @@
|
||||
"+end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "98200bee05decb871fcfdf6858ee954898880f72..b6210fce75b001a4f6dcebfd8977c41c74c55e40"
|
||||
"shas": "ebc16e531db91e278be158e0331d53d4662ad941..5e2215181b0d458b246a17cfcff87a83a93bdf8b"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-class-replacement-insert-test",
|
||||
@ -97,12 +97,30 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "b6210fce75b001a4f6dcebfd8977c41c74c55e40..4d8c5346eda3e267a62cbe1cd2da74ff24035f5b"
|
||||
"shas": "5e2215181b0d458b246a17cfcff87a83a93bdf8b..1bafee2d2f36e4b9cd366c17b0980518c1fbf89a"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-class-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {},
|
||||
"changes": {
|
||||
"class.rb": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
18
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'Super' identifier in the Foo class"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
@ -121,12 +139,30 @@
|
||||
" class Foo < Super"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "4d8c5346eda3e267a62cbe1cd2da74ff24035f5b..895b7645a3ad8b26bfb59f814bf914213a1508f8"
|
||||
"shas": "1bafee2d2f36e4b9cd366c17b0980518c1fbf89a..eac31bbf2f3921384eb5ace16b975e0d19bec71f"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-class-replacement-test",
|
||||
"expectedResult": {
|
||||
"changes": {},
|
||||
"changes": {
|
||||
"class.rb": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
13
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
18
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'Super' identifier in the Foo class"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
@ -145,7 +181,7 @@
|
||||
" class Foo < Super"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "895b7645a3ad8b26bfb59f814bf914213a1508f8..64fd047eef7b0ce2ea5e8746e8d79b3ca8c0ec06"
|
||||
"shas": "eac31bbf2f3921384eb5ace16b975e0d19bec71f..cbf40bb9582a34c3d040e59287a0f68657389ed4"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-class-delete-replacement-test",
|
||||
@ -222,7 +258,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "64fd047eef7b0ce2ea5e8746e8d79b3ca8c0ec06..129ea7453ad876f91980fe45c08f65586d0b082b"
|
||||
"shas": "cbf40bb9582a34c3d040e59287a0f68657389ed4..c44c459ce8d0efcc395bca51374a645977ca9b9c"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-class-delete-test",
|
||||
@ -265,7 +301,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "129ea7453ad876f91980fe45c08f65586d0b082b..7a054e58466e2a33d7c70bb948497f3b0622b6e5"
|
||||
"shas": "c44c459ce8d0efcc395bca51374a645977ca9b9c..1adb2921e5326d0bfc0171d779ed83cf62da6a70"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-class-delete-rest-test",
|
||||
@ -305,5 +341,5 @@
|
||||
"-end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "7a054e58466e2a33d7c70bb948497f3b0622b6e5..5e4ebb1f424a9e273ffc7cc40c76cee1d78b0d77"
|
||||
"shas": "1adb2921e5326d0bfc0171d779ed83cf62da6a70..ab126516af689f66354c40e2b73bad9ea5b34fc4"
|
||||
}]
|
||||
|
@ -16,7 +16,7 @@
|
||||
"+# This is a comment"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "a07f2fef830bc79ffa2136025c4e29d5c8a0ff1b..d3d916a02cf198fb7c5c5f96df6b1fc4382b76e8"
|
||||
"shas": "581df677d2a670ad93b167b548320511297d8332..4d101d0c1e5d133362d2e51384526bc842090237"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-comment-replacement-insert-test",
|
||||
@ -41,7 +41,7 @@
|
||||
" # This is a comment"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "d3d916a02cf198fb7c5c5f96df6b1fc4382b76e8..f7b133e4dd896586ba44964a6d2bd39a6127add3"
|
||||
"shas": "4d101d0c1e5d133362d2e51384526bc842090237..82844d01f5488e372a03c1775bfe067b4863236d"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-comment-delete-insert-test",
|
||||
@ -67,7 +67,7 @@
|
||||
" # This is a comment"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "f7b133e4dd896586ba44964a6d2bd39a6127add3..0a2c056dcc8f63a3911048c316c580cf4252efc7"
|
||||
"shas": "82844d01f5488e372a03c1775bfe067b4863236d..480511f95251c93ca3ce1e177a0a9e5a44393e5c"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-comment-replacement-test",
|
||||
@ -93,7 +93,7 @@
|
||||
" # This is a comment"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "0a2c056dcc8f63a3911048c316c580cf4252efc7..bf6bbf3aa85c998bbea81e8fcd8c51057e9a843c"
|
||||
"shas": "480511f95251c93ca3ce1e177a0a9e5a44393e5c..6f19900e698110e71395e3df1d6295125e6a296c"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-comment-delete-replacement-test",
|
||||
@ -119,7 +119,7 @@
|
||||
"-# This is a comment"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "bf6bbf3aa85c998bbea81e8fcd8c51057e9a843c..c7b39074cc7505098417f848da30325ca8b7410f"
|
||||
"shas": "6f19900e698110e71395e3df1d6295125e6a296c..7d9ba1287f69442902c32989c9b412faeef252ac"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-comment-delete-test",
|
||||
@ -142,7 +142,7 @@
|
||||
" comment"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "c7b39074cc7505098417f848da30325ca8b7410f..ef695b264a83cfc43b8b08eb4bfcd4f22fa138d1"
|
||||
"shas": "7d9ba1287f69442902c32989c9b412faeef252ac..f917235ee71bd1e20bb860ded0c031801957680a"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-comment-delete-rest-test",
|
||||
@ -165,5 +165,5 @@
|
||||
"-=end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "ef695b264a83cfc43b8b08eb4bfcd4f22fa138d1..0f08e943de503b5d714186206425966f0517ddec"
|
||||
"shas": "f917235ee71bd1e20bb860ded0c031801957680a..102ebf0b263b96260e08b9e01bc647378aac78db"
|
||||
}]
|
||||
|
@ -50,7 +50,7 @@
|
||||
"+a > b"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "90aa585d4ae985a7c45200caf714149779717558..3f805e1231d263aaee85a8ac7d2ae11fd70c4fc6"
|
||||
"shas": "8b0ce2b5b84158c85e605ab2a0073b9b89994fed..11eb32a836c6ff108d2a9f246162212ec6405922"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-comparision-operator-replacement-insert-test",
|
||||
@ -138,7 +138,7 @@
|
||||
" a > b"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "3f805e1231d263aaee85a8ac7d2ae11fd70c4fc6..a6a5370ffbd9e6d6f1c2b0420eabe85b2724e073"
|
||||
"shas": "11eb32a836c6ff108d2a9f246162212ec6405922..a245a3c38eaaf69df059ac9daf8d73b5c6db4057"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-comparision-operator-delete-insert-test",
|
||||
@ -221,7 +221,7 @@
|
||||
" x < y"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "a6a5370ffbd9e6d6f1c2b0420eabe85b2724e073..eb604c0bcf71199d5c621faae2e35bf19d5d38f5"
|
||||
"shas": "a245a3c38eaaf69df059ac9daf8d73b5c6db4057..329a56f174b99e19ec8ef294cbf3466d6f169cd8"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-comparision-operator-replacement-test",
|
||||
@ -304,7 +304,7 @@
|
||||
" x < y"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "eb604c0bcf71199d5c621faae2e35bf19d5d38f5..85ec514fd02a930895b759fde6c1ae1c168f2305"
|
||||
"shas": "329a56f174b99e19ec8ef294cbf3466d6f169cd8..301792012e4b641a97cfe53ac89611486e08f10f"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-comparision-operator-delete-replacement-test",
|
||||
@ -424,7 +424,7 @@
|
||||
"+a >= b"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "85ec514fd02a930895b759fde6c1ae1c168f2305..6c1ce08787e2be33cdff965236183001674249e0"
|
||||
"shas": "301792012e4b641a97cfe53ac89611486e08f10f..8e9fd0197af847d0b52fef431f4bb1558a2c3a97"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-comparision-operator-delete-test",
|
||||
@ -480,7 +480,7 @@
|
||||
" a >= b"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "6c1ce08787e2be33cdff965236183001674249e0..ef13be31a7ebb4b35e3c83e52bc45d3a345d0503"
|
||||
"shas": "8e9fd0197af847d0b52fef431f4bb1558a2c3a97..7422e633ba92a94f164c43bfc80ec14920ab2153"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-comparision-operator-delete-rest-test",
|
||||
@ -534,5 +534,5 @@
|
||||
"-a >= b"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "ef13be31a7ebb4b35e3c83e52bc45d3a345d0503..f7475f092fd81593aab4939187efba0e1a894cc6"
|
||||
"shas": "7422e633ba92a94f164c43bfc80ec14920ab2153..b8665811d4bea5d475c83e70b2b135910cd12238"
|
||||
}]
|
||||
|
@ -34,7 +34,7 @@
|
||||
"+x ||= 5"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "bba90b67e00732e5f4f32a72f7b6b131d33dd30e..aed651d3923765ed3138e049c2cc0ba2cde6cb84"
|
||||
"shas": "7c923dd9edc785cfae17ddf168ca4f063c7e7604..fec1351ff34382c4388b4190c133ed0bf2447166"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-conditional-assignment-replacement-insert-test",
|
||||
@ -89,7 +89,7 @@
|
||||
" x ||= 5"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "aed651d3923765ed3138e049c2cc0ba2cde6cb84..db83fd26ce25ec9193f84fd776f8c36289ce7516"
|
||||
"shas": "fec1351ff34382c4388b4190c133ed0bf2447166..557d343ef0d8d55d28cc377aafebfa30c77c2c62"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-conditional-assignment-delete-insert-test",
|
||||
@ -142,7 +142,7 @@
|
||||
" x ||= 5"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "db83fd26ce25ec9193f84fd776f8c36289ce7516..c9bcb43f918ac8a89adf2e4f5227113fd65c13cc"
|
||||
"shas": "557d343ef0d8d55d28cc377aafebfa30c77c2c62..e16d621420a3602f2d60875df77a3b6b9d0bb6c9"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-conditional-assignment-replacement-test",
|
||||
@ -195,7 +195,7 @@
|
||||
" x ||= 5"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "c9bcb43f918ac8a89adf2e4f5227113fd65c13cc..12100cef49bba40f05ebaf7f015e6f39c409f2c2"
|
||||
"shas": "e16d621420a3602f2d60875df77a3b6b9d0bb6c9..c27b7c722bb192102922964a90ca12da98eadb08"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-conditional-assignment-delete-replacement-test",
|
||||
@ -266,7 +266,7 @@
|
||||
"+x &&= 7"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "12100cef49bba40f05ebaf7f015e6f39c409f2c2..b2e02b7f3e454208a01199c2196b0a39eaabe4e0"
|
||||
"shas": "c27b7c722bb192102922964a90ca12da98eadb08..539e9e8cad37b9c6152c61f8a4ca3375021f2a56"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-conditional-assignment-delete-test",
|
||||
@ -305,7 +305,7 @@
|
||||
" x &&= 7"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "b2e02b7f3e454208a01199c2196b0a39eaabe4e0..923f68eae40f6ea6b48688f9c0170ceb67f54fb3"
|
||||
"shas": "539e9e8cad37b9c6152c61f8a4ca3375021f2a56..481e8df80d47fd0a2530b869ee0fa0e07db6ad04"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-conditional-assignment-delete-rest-test",
|
||||
@ -343,5 +343,5 @@
|
||||
"-x &&= 7"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "923f68eae40f6ea6b48688f9c0170ceb67f54fb3..016efbbed35a70176cf3ec8bb08369cf7889c2e7"
|
||||
"shas": "481e8df80d47fd0a2530b869ee0fa0e07db6ad04..f6e95f576fdbe837a5fa09bd74b0d87bcca7c856"
|
||||
}]
|
||||
|
442
test/corpus/diff-summaries/ruby/delimiter.json
Normal file
442
test/corpus/diff-summaries/ruby/delimiter.json
Normal file
@ -0,0 +1,442 @@
|
||||
[{
|
||||
"testCaseDescription": "ruby-delimiter-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"delimiter.rb": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
2,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
2,
|
||||
10
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the %q<a<b>c> string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {
|
||||
"delimiter.rb": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
6
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '%q#a#' at line 1, column 1 - line 1, column 6"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added '%#a#\n%Q#a#\n%<a<b>c>\n%Q<a<b>c>\n' at line 3, column 1 - line 7, column 1"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"filePaths": [
|
||||
"delimiter.rb"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/delimiter.rb b/delimiter.rb",
|
||||
"index e69de29..8ec39b8 100644",
|
||||
"--- a/delimiter.rb",
|
||||
"+++ b/delimiter.rb",
|
||||
"@@ -0,0 +1,6 @@",
|
||||
"+%q#a#",
|
||||
"+%q<a<b>c>",
|
||||
"+%#a#",
|
||||
"+%Q#a#",
|
||||
"+%<a<b>c>",
|
||||
"+%Q<a<b>c>"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "e3bf2ed1e31569b6093ee1fc86e4cc8340ca76d7..f169c2b7eccf7f9fdc895ea8ac1042a82eaa0830"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-delimiter-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"delimiter.rb": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
1,
|
||||
6
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
19,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '%q#a#' at line 1, column 1 - line 1, column 6 with '%q/b/\n%q{d{e}f}\n%/b/\n%Q/b/\n%{d{e}f}\n%Q{d{e}f}\n%q#a#\n%q<a<b>c>\n%#a#\n%Q#a#\n%<a<b>c>\n%Q<a<b>c>\n%q#a#\n%q<a<b>c>\n%#a#\n%Q#a#\n%<a<b>c>\n%Q<a<b>c>\n' at line 1, column 1 - line 19, column 1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"delimiter.rb"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/delimiter.rb b/delimiter.rb",
|
||||
"index 8ec39b8..5b0f7ec 100644",
|
||||
"--- a/delimiter.rb",
|
||||
"+++ b/delimiter.rb",
|
||||
"@@ -1,3 +1,15 @@",
|
||||
"+%q/b/",
|
||||
"+%q{d{e}f}",
|
||||
"+%/b/",
|
||||
"+%Q/b/",
|
||||
"+%{d{e}f}",
|
||||
"+%Q{d{e}f}",
|
||||
"+%q#a#",
|
||||
"+%q<a<b>c>",
|
||||
"+%#a#",
|
||||
"+%Q#a#",
|
||||
"+%<a<b>c>",
|
||||
"+%Q<a<b>c>",
|
||||
" %q#a#",
|
||||
" %q<a<b>c>",
|
||||
" %#a#"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "f169c2b7eccf7f9fdc895ea8ac1042a82eaa0830..c6d854bdd98c01795b876d06a196c34a0554bf8b"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-delimiter-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"delimiter.rb": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
19,
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
19,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '%q/b/\n%q{d{e}f}\n%/b/\n%Q/b/\n%{d{e}f}\n%Q{d{e}f}\n%q#a#\n%q<a<b>c>\n%#a#\n%Q#a#\n%<a<b>c>\n%Q<a<b>c>\n%q#a#\n%q<a<b>c>\n%#a#\n%Q#a#\n%<a<b>c>\n%Q<a<b>c>\n' at line 1, column 1 - line 19, column 1 with '%q#a#\n%q<a<b>c>\n%#a#\n%Q#a#\n%<a<b>c>\n%Q<a<b>c>\n%q#a#\n%q<a<b>c>\n%#a#\n%Q#a#\n%<a<b>c>\n%Q<a<b>c>\n%q#a#\n%q<a<b>c>\n%#a#\n%Q#a#\n%<a<b>c>\n%Q<a<b>c>\n' at line 1, column 1 - line 19, column 1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"delimiter.rb"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/delimiter.rb b/delimiter.rb",
|
||||
"index 5b0f7ec..64d6df4 100644",
|
||||
"--- a/delimiter.rb",
|
||||
"+++ b/delimiter.rb",
|
||||
"@@ -1,9 +1,9 @@",
|
||||
"-%q/b/",
|
||||
"-%q{d{e}f}",
|
||||
"-%/b/",
|
||||
"-%Q/b/",
|
||||
"-%{d{e}f}",
|
||||
"-%Q{d{e}f}",
|
||||
"+%q#a#",
|
||||
"+%q<a<b>c>",
|
||||
"+%#a#",
|
||||
"+%Q#a#",
|
||||
"+%<a<b>c>",
|
||||
"+%Q<a<b>c>",
|
||||
" %q#a#",
|
||||
" %q<a<b>c>",
|
||||
" %#a#"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "c6d854bdd98c01795b876d06a196c34a0554bf8b..75e318a517253a5d70efff9d2c9a36cc3574b01f"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-delimiter-replacement-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"delimiter.rb": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
19,
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
19,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '%q#a#\n%q<a<b>c>\n%#a#\n%Q#a#\n%<a<b>c>\n%Q<a<b>c>\n%q#a#\n%q<a<b>c>\n%#a#\n%Q#a#\n%<a<b>c>\n%Q<a<b>c>\n%q#a#\n%q<a<b>c>\n%#a#\n%Q#a#\n%<a<b>c>\n%Q<a<b>c>\n' at line 1, column 1 - line 19, column 1 with '%q/b/\n%q{d{e}f}\n%/b/\n%Q/b/\n%{d{e}f}\n%Q{d{e}f}\n%q#a#\n%q<a<b>c>\n%#a#\n%Q#a#\n%<a<b>c>\n%Q<a<b>c>\n%q#a#\n%q<a<b>c>\n%#a#\n%Q#a#\n%<a<b>c>\n%Q<a<b>c>\n' at line 1, column 1 - line 19, column 1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"delimiter.rb"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/delimiter.rb b/delimiter.rb",
|
||||
"index 64d6df4..5b0f7ec 100644",
|
||||
"--- a/delimiter.rb",
|
||||
"+++ b/delimiter.rb",
|
||||
"@@ -1,9 +1,9 @@",
|
||||
"-%q#a#",
|
||||
"-%q<a<b>c>",
|
||||
"-%#a#",
|
||||
"-%Q#a#",
|
||||
"-%<a<b>c>",
|
||||
"-%Q<a<b>c>",
|
||||
"+%q/b/",
|
||||
"+%q{d{e}f}",
|
||||
"+%/b/",
|
||||
"+%Q/b/",
|
||||
"+%{d{e}f}",
|
||||
"+%Q{d{e}f}",
|
||||
" %q#a#",
|
||||
" %q<a<b>c>",
|
||||
" %#a#"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "75e318a517253a5d70efff9d2c9a36cc3574b01f..2888bde644c8c79c9858efdb2ad7178e7febda02"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-delimiter-delete-replacement-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"delimiter.rb": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
19,
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
13,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '%q/b/\n%q{d{e}f}\n%/b/\n%Q/b/\n%{d{e}f}\n%Q{d{e}f}\n%q#a#\n%q<a<b>c>\n%#a#\n%Q#a#\n%<a<b>c>\n%Q<a<b>c>\n%q#a#\n%q<a<b>c>\n%#a#\n%Q#a#\n%<a<b>c>\n%Q<a<b>c>\n' at line 1, column 1 - line 19, column 1 with '%q#a#\n%q<a<b>c>\n%#a#\n%Q#a#\n%<a<b>c>\n%Q<a<b>c>\n%q/b/\n%q{d{e}f}\n%/b/\n%Q/b/\n%{d{e}f}\n%Q{d{e}f}\n' at line 1, column 1 - line 13, column 1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"delimiter.rb"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/delimiter.rb b/delimiter.rb",
|
||||
"index 5b0f7ec..2095136 100644",
|
||||
"--- a/delimiter.rb",
|
||||
"+++ b/delimiter.rb",
|
||||
"@@ -1,18 +1,12 @@",
|
||||
"-%q/b/",
|
||||
"-%q{d{e}f}",
|
||||
"-%/b/",
|
||||
"-%Q/b/",
|
||||
"-%{d{e}f}",
|
||||
"-%Q{d{e}f}",
|
||||
"-%q#a#",
|
||||
"-%q<a<b>c>",
|
||||
"-%#a#",
|
||||
"-%Q#a#",
|
||||
"-%<a<b>c>",
|
||||
"-%Q<a<b>c>",
|
||||
" %q#a#",
|
||||
" %q<a<b>c>",
|
||||
" %#a#",
|
||||
" %Q#a#",
|
||||
" %<a<b>c>",
|
||||
" %Q<a<b>c>",
|
||||
"+%q/b/",
|
||||
"+%q{d{e}f}",
|
||||
"+%/b/",
|
||||
"+%Q/b/",
|
||||
"+%{d{e}f}",
|
||||
"+%Q{d{e}f}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "2888bde644c8c79c9858efdb2ad7178e7febda02..fe305a3e338da14342a57d5b931e2c76c76f5088"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-delimiter-delete-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"delimiter.rb": [
|
||||
{
|
||||
"span": {
|
||||
"replace": [
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
13,
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": "Replaced '%q#a#\n%q<a<b>c>\n%#a#\n%Q#a#\n%<a<b>c>\n%Q<a<b>c>\n%q/b/\n%q{d{e}f}\n%/b/\n%Q/b/\n%{d{e}f}\n%Q{d{e}f}\n' at line 1, column 1 - line 13, column 1 with '%q/b/\n%q{d{e}f}\n%/b/\n%Q/b/\n%{d{e}f}\n%Q{d{e}f}\n' at line 1, column 1 - line 7, column 1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"delimiter.rb"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/delimiter.rb b/delimiter.rb",
|
||||
"index 2095136..3843090 100644",
|
||||
"--- a/delimiter.rb",
|
||||
"+++ b/delimiter.rb",
|
||||
"@@ -1,9 +1,3 @@",
|
||||
"-%q#a#",
|
||||
"-%q<a<b>c>",
|
||||
"-%#a#",
|
||||
"-%Q#a#",
|
||||
"-%<a<b>c>",
|
||||
"-%Q<a<b>c>",
|
||||
" %q/b/",
|
||||
" %q{d{e}f}",
|
||||
" %/b/"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "fe305a3e338da14342a57d5b931e2c76c76f5088..a113a1937711ee8a6d5814a05f23acd802450a90"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-delimiter-delete-rest-test",
|
||||
"expectedResult": {
|
||||
"changes": {},
|
||||
"errors": {
|
||||
"delimiter.rb": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
7,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted '%q/b/\n%q{d{e}f}\n%/b/\n%Q/b/\n%{d{e}f}\n%Q{d{e}f}\n' at line 1, column 1 - line 7, column 1"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"filePaths": [
|
||||
"delimiter.rb"
|
||||
],
|
||||
"patch": [
|
||||
"diff --git a/delimiter.rb b/delimiter.rb",
|
||||
"index 3843090..e69de29 100644",
|
||||
"--- a/delimiter.rb",
|
||||
"+++ b/delimiter.rb",
|
||||
"@@ -1,6 +0,0 @@",
|
||||
"-%q/b/",
|
||||
"-%q{d{e}f}",
|
||||
"-%/b/",
|
||||
"-%Q/b/",
|
||||
"-%{d{e}f}",
|
||||
"-%Q{d{e}f}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "a113a1937711ee8a6d5814a05f23acd802450a90..0f6cb87a146aa3332ff673d24b8c4756cad55afc"
|
||||
}]
|
@ -66,7 +66,7 @@
|
||||
"+foo[bar] = 1"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "72f935172c31da7ddd21bf1a12c7baeb4fdb3419..1b88f5fd6eaa6af48eef0522c818919cc89fe0f3"
|
||||
"shas": "1aea9068dbdffb0bbd5c543d592d8c0479573e14..25e55f37d4b32b3c64f736bfd2def380021bdf39"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-element-reference-replacement-insert-test",
|
||||
@ -171,7 +171,7 @@
|
||||
" foo[bar] = 1"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "1b88f5fd6eaa6af48eef0522c818919cc89fe0f3..3114590b91f23ee9d8e9656e3c597b7710c5f08a"
|
||||
"shas": "25e55f37d4b32b3c64f736bfd2def380021bdf39..a0e8a9e5cf524f12360d9e2eab204d821e508836"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-element-reference-delete-insert-test",
|
||||
@ -297,7 +297,7 @@
|
||||
" foo[bar] = 1"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "3114590b91f23ee9d8e9656e3c597b7710c5f08a..470abdcd5adc26a44bbd001539d731e36d417046"
|
||||
"shas": "a0e8a9e5cf524f12360d9e2eab204d821e508836..c9dcc58a813be36814447378d15f5a76cbdf4d85"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-element-reference-replacement-test",
|
||||
@ -423,7 +423,7 @@
|
||||
" foo[bar] = 1"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "470abdcd5adc26a44bbd001539d731e36d417046..ee5fbeec520aa431dcf290c4a7eb220d2bb2b674"
|
||||
"shas": "c9dcc58a813be36814447378d15f5a76cbdf4d85..ac3e2c08df0b4dc19d7d0b3d480a8914a4c607fe"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-element-reference-delete-replacement-test",
|
||||
@ -560,7 +560,7 @@
|
||||
"+x[:\"c\"]"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "ee5fbeec520aa431dcf290c4a7eb220d2bb2b674..3fb44d52e9f12fd560773298d89b1721698f358a"
|
||||
"shas": "ac3e2c08df0b4dc19d7d0b3d480a8914a4c607fe..2c7978e36b430dbfaa2a5b0da1830509e3aca00d"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-element-reference-delete-test",
|
||||
@ -632,7 +632,7 @@
|
||||
" x[:\"c\"]"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "3fb44d52e9f12fd560773298d89b1721698f358a..0207d27c72e4662c924f3f408396247dbc990739"
|
||||
"shas": "2c7978e36b430dbfaa2a5b0da1830509e3aca00d..3398b8b0cf9e88eb2512e2cf75fdea03ad0c7b1b"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-element-reference-delete-rest-test",
|
||||
@ -686,5 +686,5 @@
|
||||
"-x[:\"c\"]"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "0207d27c72e4662c924f3f408396247dbc990739..72e1f4912f54a936266422abbb53a9c2fc864992"
|
||||
"shas": "3398b8b0cf9e88eb2512e2cf75fdea03ad0c7b1b..166c92e7981b72600fa1e5096d0be628cc8d962c"
|
||||
}]
|
||||
|
@ -36,7 +36,7 @@
|
||||
"+end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "4fed48f0abf8058f93dbb4c7361358c434c9bb6d..e1fa35de3fc02773c68ea68b126d5a42843cff03"
|
||||
"shas": "5127fe99b505deff8beb2b738a1225eaaaee825f..86d63ca274c0865badae15122e38d1e366cfaf94"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-else-insert-test",
|
||||
@ -77,7 +77,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "e1fa35de3fc02773c68ea68b126d5a42843cff03..37109135d5e8872de06650f214f53d5782718911"
|
||||
"shas": "86d63ca274c0865badae15122e38d1e366cfaf94..e521a84a5a7fac228959521bb9c5107e64e1a90a"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-else-replacement-test",
|
||||
@ -131,7 +131,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "37109135d5e8872de06650f214f53d5782718911..e9f5d111cea4eb38ef60719ace819f23d38d2c7b"
|
||||
"shas": "e521a84a5a7fac228959521bb9c5107e64e1a90a..40369a29a5a69d8e399e26d3c4d0c16ca2522e6e"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-else-delete-replacement-test",
|
||||
@ -185,7 +185,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "e9f5d111cea4eb38ef60719ace819f23d38d2c7b..343ff65611626b914e8d8a3e97c6159ef40e1262"
|
||||
"shas": "40369a29a5a69d8e399e26d3c4d0c16ca2522e6e..d53132e4ef60c246d47403d7619c62bbe0eb9216"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-else-delete-insert-test",
|
||||
@ -226,7 +226,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "343ff65611626b914e8d8a3e97c6159ef40e1262..d849d51a7355131232dbf59bd5b3d20fa660b059"
|
||||
"shas": "d53132e4ef60c246d47403d7619c62bbe0eb9216..fd5cbc922c0c10436c763fc15e574d90ce1c3bbb"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-else-teardown-test",
|
||||
@ -266,5 +266,5 @@
|
||||
"-end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "d849d51a7355131232dbf59bd5b3d20fa660b059..f6f1229dfdaa0bf7f5b33425764b3b4423e6e28c"
|
||||
"shas": "fd5cbc922c0c10436c763fc15e574d90ce1c3bbb..c121edce8d75129944087d6c723ebd4b3b34f658"
|
||||
}]
|
||||
|
@ -36,7 +36,7 @@
|
||||
"+end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "d571b61c3d53f568ed84cc6dad1c76cea2abe08d..adfbf640ca01c2a8140a30b71499b03d8e9602db"
|
||||
"shas": "c121edce8d75129944087d6c723ebd4b3b34f658..a5047ae38624d3b39b10226f45423f58a5421ed8"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-elsif-insert-test",
|
||||
@ -77,7 +77,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "adfbf640ca01c2a8140a30b71499b03d8e9602db..c56c2c77e578103675c05343baa6ac9b57de69c9"
|
||||
"shas": "a5047ae38624d3b39b10226f45423f58a5421ed8..c99e2d50d89f60222355fc2904878dd670dc8570"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-elsif-replacement-test",
|
||||
@ -119,7 +119,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "c56c2c77e578103675c05343baa6ac9b57de69c9..9d868b4d65a258ca50a0432f32d6ce476a0ec90b"
|
||||
"shas": "c99e2d50d89f60222355fc2904878dd670dc8570..e810202d3b43983fdb819bc5f1d0ac066c410385"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-elsif-delete-replacement-test",
|
||||
@ -161,7 +161,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "9d868b4d65a258ca50a0432f32d6ce476a0ec90b..ae5492ab9e3097846c7c9365e1dba37799da7cf0"
|
||||
"shas": "e810202d3b43983fdb819bc5f1d0ac066c410385..81e19a920356775dad5ded10adb1d55f34500ae8"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-elsif-delete-insert-test",
|
||||
@ -202,7 +202,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "ae5492ab9e3097846c7c9365e1dba37799da7cf0..3c79699074347065dc50d414845fc7dada45dc0e"
|
||||
"shas": "81e19a920356775dad5ded10adb1d55f34500ae8..5dc564a05b96ac7545ffac4596a20ec4531aae91"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-elsif-teardown-test",
|
||||
@ -242,5 +242,5 @@
|
||||
"-end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "3c79699074347065dc50d414845fc7dada45dc0e..291c23618b5574de7402f710d7feba58b0edbcc2"
|
||||
"shas": "5dc564a05b96ac7545ffac4596a20ec4531aae91..9e37beebab6d54d13e727fa92c3950fbe8b6bc37"
|
||||
}]
|
||||
|
@ -36,7 +36,7 @@
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "82c6448a6e4e2d885ac6f12d9f86cdb1d6d1dd2d..d2ed526fb844a051febd47469d494caa75fe91f0"
|
||||
"shas": "bc59f083f15dede23c12c1777479b8f0ea372aaa..da317f0a13ac0f1da243e19a7ee7f11e82936b52"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-end-block-replacement-insert-test",
|
||||
@ -113,7 +113,7 @@
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "d2ed526fb844a051febd47469d494caa75fe91f0..d63a52f07a0f0bcf858af8cd8be7547da36d07f9"
|
||||
"shas": "da317f0a13ac0f1da243e19a7ee7f11e82936b52..3f23e2cd1f98f46bb6fe4e646b37ac7f846f8c42"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-end-block-delete-insert-test",
|
||||
@ -187,7 +187,7 @@
|
||||
" foo"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "d63a52f07a0f0bcf858af8cd8be7547da36d07f9..e81caf1424dc328e8ab385e9c747a63d54698444"
|
||||
"shas": "3f23e2cd1f98f46bb6fe4e646b37ac7f846f8c42..9ad0664022768455ee132d31e2e020e8a1d12d09"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-end-block-replacement-test",
|
||||
@ -258,7 +258,7 @@
|
||||
" foo"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "e81caf1424dc328e8ab385e9c747a63d54698444..e84b2b99dab363e56f8785e8b39c18a71009aa4e"
|
||||
"shas": "9ad0664022768455ee132d31e2e020e8a1d12d09..cd2a631c242a56b1bb1900a99ce4dafb8d5f5aaf"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-end-block-delete-replacement-test",
|
||||
@ -307,7 +307,7 @@
|
||||
" }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "e84b2b99dab363e56f8785e8b39c18a71009aa4e..d064522cbf35b19bb71d3999617cd95576ef5d15"
|
||||
"shas": "cd2a631c242a56b1bb1900a99ce4dafb8d5f5aaf..d137bde979050feb00f03adfaf9111ee73af3d8a"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-end-block-delete-test",
|
||||
@ -350,7 +350,7 @@
|
||||
" bar"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "d064522cbf35b19bb71d3999617cd95576ef5d15..f28e52757945cbfc7235452bdfb242f59fe209b6"
|
||||
"shas": "d137bde979050feb00f03adfaf9111ee73af3d8a..0bec960a4dda6674815c3c4c5ac8c9e1891a06b5"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-end-block-delete-rest-test",
|
||||
@ -406,5 +406,5 @@
|
||||
"-}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "f28e52757945cbfc7235452bdfb242f59fe209b6..ad37c6bddef1ebfea76c652b142476e8268b9f9f"
|
||||
"shas": "0bec960a4dda6674815c3c4c5ac8c9e1891a06b5..97513ccc92beee8dc279d44117dce9155e578efe"
|
||||
}]
|
||||
|
@ -36,7 +36,7 @@
|
||||
"+end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "f6f1229dfdaa0bf7f5b33425764b3b4423e6e28c..b10ccba8ad4f11f74e74fe5eca3b97e5a604aff2"
|
||||
"shas": "9e37beebab6d54d13e727fa92c3950fbe8b6bc37..42bdf634b36e99a750c4f41553ec57fbe5e9f950"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-ensure-insert-test",
|
||||
@ -77,7 +77,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "b10ccba8ad4f11f74e74fe5eca3b97e5a604aff2..fa5e430655c2dcff9f8c706046b6c5a230172103"
|
||||
"shas": "42bdf634b36e99a750c4f41553ec57fbe5e9f950..7f1ed0cc7b67f2a59c652de898fe9b3c0ede003f"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-ensure-replacement-test",
|
||||
@ -131,7 +131,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "fa5e430655c2dcff9f8c706046b6c5a230172103..5eb9ced9edc1f64762468d4378055a3c44c7688c"
|
||||
"shas": "7f1ed0cc7b67f2a59c652de898fe9b3c0ede003f..f7c1ecc5dc3c3da4d2aa5ebadcffc1dff1efa97a"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-ensure-delete-replacement-test",
|
||||
@ -185,7 +185,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "5eb9ced9edc1f64762468d4378055a3c44c7688c..a8e6dd4fff6bf1580be14213e216207ed53cf059"
|
||||
"shas": "f7c1ecc5dc3c3da4d2aa5ebadcffc1dff1efa97a..89fa50850c22a023072a0b562c61577448f8dc4a"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-ensure-delete-insert-test",
|
||||
@ -226,7 +226,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "a8e6dd4fff6bf1580be14213e216207ed53cf059..324595aac765613b219d4e80d627e6eb186cec57"
|
||||
"shas": "89fa50850c22a023072a0b562c61577448f8dc4a..54159298eb4125b9aacf3ca8db605584694ce8a2"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-ensure-teardown-test",
|
||||
@ -266,5 +266,5 @@
|
||||
"-end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "324595aac765613b219d4e80d627e6eb186cec57..5df8bfbe172193e6124da27f457fa6fb19547593"
|
||||
"shas": "54159298eb4125b9aacf3ca8db605584694ce8a2..5cc243cda94fa2788a86c16754a39ec988628dbb"
|
||||
}]
|
||||
|
@ -36,7 +36,7 @@
|
||||
"+end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "b8e7a4d5034214328f3391e3c6001076f5bb6ec9..1e4b5ce7ca850c42c111c21fd9d8f38990fc3cbf"
|
||||
"shas": "b55e70db0fed4efeb4bb9f9b7abd3bba675a1ec3..63e08d362d334e13462d5e04802214a92ae9dc2b"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-for-replacement-insert-test",
|
||||
@ -97,7 +97,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "1e4b5ce7ca850c42c111c21fd9d8f38990fc3cbf..c2e6812edb506dd8a3b9419e33f6d21c4998a1b7"
|
||||
"shas": "63e08d362d334e13462d5e04802214a92ae9dc2b..f59f4aaa825284676bcedb2d7adf6cafd7abe651"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-for-delete-insert-test",
|
||||
@ -153,7 +153,7 @@
|
||||
" f"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "c2e6812edb506dd8a3b9419e33f6d21c4998a1b7..bd3974e67a2154631e5a3348a1c4d13d38277cf7"
|
||||
"shas": "f59f4aaa825284676bcedb2d7adf6cafd7abe651..5af410c3d019faf93cd1afa32259a165fa08d997"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-for-replacement-test",
|
||||
@ -209,7 +209,7 @@
|
||||
" f"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "bd3974e67a2154631e5a3348a1c4d13d38277cf7..7547579e6c4c271afb05ba08271f0ed4b4b678ea"
|
||||
"shas": "5af410c3d019faf93cd1afa32259a165fa08d997..d7755505944f21d2f7dbea4c7ef53443538ed38c"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-for-delete-replacement-test",
|
||||
@ -287,7 +287,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "7547579e6c4c271afb05ba08271f0ed4b4b678ea..467953257426ae06a5f6026a93d2820676c903c0"
|
||||
"shas": "d7755505944f21d2f7dbea4c7ef53443538ed38c..c220e0c27262ee44b884a761a26b9feed83e5c08"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-for-delete-test",
|
||||
@ -330,7 +330,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "467953257426ae06a5f6026a93d2820676c903c0..1fd6b5413c62cdb0f0b1822736dfdacdbbc267a0"
|
||||
"shas": "c220e0c27262ee44b884a761a26b9feed83e5c08..d274c04cda54ce07414cc3bfeb507c4471cc7d33"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-for-delete-rest-test",
|
||||
@ -370,5 +370,5 @@
|
||||
"-end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "1fd6b5413c62cdb0f0b1822736dfdacdbbc267a0..72f935172c31da7ddd21bf1a12c7baeb4fdb3419"
|
||||
"shas": "d274c04cda54ce07414cc3bfeb507c4471cc7d33..1aea9068dbdffb0bbd5c543d592d8c0479573e14"
|
||||
}]
|
||||
|
@ -34,7 +34,7 @@
|
||||
"+{ :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "5c66ec3700761ca4868e703f576449f5a190e5a5..8ed1097ecb63f00552d0dcf65c4d7f97e554660a"
|
||||
"shas": "15350025c06bebe12d0443222898e58cfdc9bfad..a5f26c6e327dac25dc97488c408a43c8eaef1d57"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-hash-replacement-insert-test",
|
||||
@ -89,7 +89,7 @@
|
||||
" { :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "8ed1097ecb63f00552d0dcf65c4d7f97e554660a..3f945480d1d0fdcff6cc85bbd257acb2471d9eb3"
|
||||
"shas": "a5f26c6e327dac25dc97488c408a43c8eaef1d57..0a4c3be2576b842bb88b10fe32b28164f173f41e"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-hash-delete-insert-test",
|
||||
@ -217,7 +217,7 @@
|
||||
" { :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "3f945480d1d0fdcff6cc85bbd257acb2471d9eb3..e651384951227cdfcca2e2aa341af92e0102c265"
|
||||
"shas": "0a4c3be2576b842bb88b10fe32b28164f173f41e..c85233ca3e2a48e147e6e9ddaecc83467639bffa"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-hash-replacement-test",
|
||||
@ -342,7 +342,7 @@
|
||||
" { :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "e651384951227cdfcca2e2aa341af92e0102c265..acf16b47847c4ad4eeea4f57c6591d882b4d7b81"
|
||||
"shas": "c85233ca3e2a48e147e6e9ddaecc83467639bffa..57a74b0f487be79104e7ed0cec196ea164004b22"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-hash-delete-replacement-test",
|
||||
@ -413,7 +413,7 @@
|
||||
"+{ key1: \"changed value\", key2: 2, key3: true }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "acf16b47847c4ad4eeea4f57c6591d882b4d7b81..84a7aaf829ca724982d91d7067bd23f7e374d2a4"
|
||||
"shas": "57a74b0f487be79104e7ed0cec196ea164004b22..9a6c1e5f0f81c57262ca22331aacc2636eb44454"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-hash-delete-test",
|
||||
@ -452,7 +452,7 @@
|
||||
" { key1: \"changed value\", key2: 2, key3: true }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "84a7aaf829ca724982d91d7067bd23f7e374d2a4..61ca4b1cef66d8a37f57f077826691d4b34ca91c"
|
||||
"shas": "9a6c1e5f0f81c57262ca22331aacc2636eb44454..621b7625965eff81d4e4a06535bbc9ea182b06bc"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-hash-delete-rest-test",
|
||||
@ -490,5 +490,5 @@
|
||||
"-{ key1: \"changed value\", key2: 2, key3: true }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "61ca4b1cef66d8a37f57f077826691d4b34ca91c..39c849e6aaf280116d0b8523fe9ae7af2ff7ffee"
|
||||
"shas": "621b7625965eff81d4e4a06535bbc9ea182b06bc..2412502f463a0cb9416638cc2da07ab2d024a52f"
|
||||
}]
|
||||
|
@ -34,7 +34,7 @@
|
||||
"+print unless foo"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "4e2fff03bd38fd80461d8cac1a09c40ca80b2390..a156c775baf7ff53bfebb34f0b044ceca96516e0"
|
||||
"shas": "0b7a3e0fb3d3a8a872b3fb94475d217170c8c393..e79eb823bb3c0b9f605908c5534beb41e1f425cb"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-if-unless-modifiers-replacement-insert-test",
|
||||
@ -89,7 +89,7 @@
|
||||
" print unless foo"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "a156c775baf7ff53bfebb34f0b044ceca96516e0..935c4f046aca16b663c3b7bbf15bb4e3b89df95f"
|
||||
"shas": "e79eb823bb3c0b9f605908c5534beb41e1f425cb..4db3cae76277e6d2fd84a279124425964dfecfe6"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-if-unless-modifiers-delete-insert-test",
|
||||
@ -145,7 +145,7 @@
|
||||
" print unless foo"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "935c4f046aca16b663c3b7bbf15bb4e3b89df95f..2f5c75839c978eb166b5ce29ddcb0c663222be8e"
|
||||
"shas": "4db3cae76277e6d2fd84a279124425964dfecfe6..fa057bdc78eabc698867b938b89ee9f8009eca57"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-if-unless-modifiers-replacement-test",
|
||||
@ -201,7 +201,7 @@
|
||||
" print unless foo"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "2f5c75839c978eb166b5ce29ddcb0c663222be8e..85ce995a212ec872107b09fd0baba8b62286c999"
|
||||
"shas": "fa057bdc78eabc698867b938b89ee9f8009eca57..051983723d56a38f226a335e8b7350f7c56e35fb"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-if-unless-modifiers-delete-replacement-test",
|
||||
@ -272,7 +272,7 @@
|
||||
"+print if foo"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "85ce995a212ec872107b09fd0baba8b62286c999..38fd6b10133d898160cd44223c081010ca440b6f"
|
||||
"shas": "051983723d56a38f226a335e8b7350f7c56e35fb..4772fa7e1eb7a92255972ade65caf4ecdb8960f7"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-if-unless-modifiers-delete-test",
|
||||
@ -311,7 +311,7 @@
|
||||
" print if foo"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "38fd6b10133d898160cd44223c081010ca440b6f..52722842753439887074cefb1075c6a31015bc82"
|
||||
"shas": "4772fa7e1eb7a92255972ade65caf4ecdb8960f7..6a01aa7535355c52bfc42113a46f9596705ffb97"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-if-unless-modifiers-delete-rest-test",
|
||||
@ -349,5 +349,5 @@
|
||||
"-print if foo"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "52722842753439887074cefb1075c6a31015bc82..c7d3f438c72d2ab2a09e3fa47ba1cf9b175d2a9b"
|
||||
"shas": "6a01aa7535355c52bfc42113a46f9596705ffb97..760d160893f207bd4480bd4cdbf9225479c045c8"
|
||||
}]
|
||||
|
@ -40,7 +40,7 @@
|
||||
"+end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "016efbbed35a70176cf3ec8bb08369cf7889c2e7..e64394684b86a0aa1426479d973d5fa65115c6d8"
|
||||
"shas": "d77defc8ba86b790d4e36ddebce231ba3d7ca1ea..cbd48390b5e96870ee04b45f01f84c28d22e88d1"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-if-replacement-insert-test",
|
||||
@ -121,7 +121,7 @@
|
||||
" elsif quux"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "e64394684b86a0aa1426479d973d5fa65115c6d8..3b952dad00efbf05e77af42fc337786d53c25ab0"
|
||||
"shas": "cbd48390b5e96870ee04b45f01f84c28d22e88d1..4e175538cb225474e98955be634042c23339a9c2"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-if-delete-insert-test",
|
||||
@ -227,7 +227,7 @@
|
||||
" bar"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "3b952dad00efbf05e77af42fc337786d53c25ab0..ecebede079885b31f55ce79cbe6a919b20618dd1"
|
||||
"shas": "4e175538cb225474e98955be634042c23339a9c2..262e64cb9e014a682a3076055054f53a92dc64e8"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-if-replacement-test",
|
||||
@ -333,7 +333,7 @@
|
||||
" bar"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "ecebede079885b31f55ce79cbe6a919b20618dd1..f34e4ac45eb68b1d48fe4e19559c716b1ae9765a"
|
||||
"shas": "262e64cb9e014a682a3076055054f53a92dc64e8..14b8a6d274fd61966abe1a82dae5f3fc318525da"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-if-delete-replacement-test",
|
||||
@ -391,7 +391,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "f34e4ac45eb68b1d48fe4e19559c716b1ae9765a..975011a6b4d433e9c281ccc29d9482c5aeca618c"
|
||||
"shas": "14b8a6d274fd61966abe1a82dae5f3fc318525da..b2a6cd4d30d72363c20768449bf41df3d9c3e2f5"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-if-delete-test",
|
||||
@ -438,7 +438,7 @@
|
||||
" if y then"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "975011a6b4d433e9c281ccc29d9482c5aeca618c..e01119c665cbc563d41d8cd9492f8a2d7f04c15a"
|
||||
"shas": "b2a6cd4d30d72363c20768449bf41df3d9c3e2f5..d2b02415f29352dbeb60f2ec9fcf6673b9d5f897"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-if-delete-rest-test",
|
||||
@ -494,5 +494,5 @@
|
||||
"-end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "e01119c665cbc563d41d8cd9492f8a2d7f04c15a..4b3dda74358a83438349bc50dc9bb75e6d632e6a"
|
||||
"shas": "d2b02415f29352dbeb60f2ec9fcf6673b9d5f897..1ab25fb6630b041158518fa5f0e383c7cabbb087"
|
||||
}]
|
||||
|
@ -50,7 +50,7 @@
|
||||
"+\"foo #{bar}\""
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "2505617f30ca311da1378227cbf6a13d83647b91..ba6045bb44bd3872e04f0e0c67e330b73429defa"
|
||||
"shas": "7d1d1ea962e005a0b1ed1d2dc9a165478d2aa972..bff76bee1706d3b868595139b6d8bac93a945617"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-interpolation-replacement-insert-test",
|
||||
@ -138,7 +138,7 @@
|
||||
" \"foo #{bar}\""
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "ba6045bb44bd3872e04f0e0c67e330b73429defa..9eab77466f1fc1d8a2ceaed51eab7b16159d2c4c"
|
||||
"shas": "bff76bee1706d3b868595139b6d8bac93a945617..7ee8a2039500750fc30a20adf2da332ce98fdaf6"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-interpolation-delete-insert-test",
|
||||
@ -221,7 +221,7 @@
|
||||
" :\"foo #{bar}\""
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "9eab77466f1fc1d8a2ceaed51eab7b16159d2c4c..c23529986ecc8afd8cc26b6e54dc68f203488cd0"
|
||||
"shas": "7ee8a2039500750fc30a20adf2da332ce98fdaf6..ca71bef8f7998f692a2dd649492d240f05765d9c"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-interpolation-replacement-test",
|
||||
@ -304,7 +304,7 @@
|
||||
" :\"foo #{bar}\""
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "c23529986ecc8afd8cc26b6e54dc68f203488cd0..477f525a5dd8fecc22f1eaaa4e77419e0255d2a9"
|
||||
"shas": "ca71bef8f7998f692a2dd649492d240f05765d9c..e27ce317daa77d780a0eddda330d4fa12a0ee907"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-interpolation-delete-replacement-test",
|
||||
@ -424,7 +424,7 @@
|
||||
"+\"bar #{foo}\""
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "477f525a5dd8fecc22f1eaaa4e77419e0255d2a9..c84f76f558cce919ec1935a75ad1b830b4511ff8"
|
||||
"shas": "e27ce317daa77d780a0eddda330d4fa12a0ee907..c2396f508190956f31e2d361684e61d7c8a353c1"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-interpolation-delete-test",
|
||||
@ -480,7 +480,7 @@
|
||||
" \"bar #{foo}\""
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "c84f76f558cce919ec1935a75ad1b830b4511ff8..cf1a6e3114fde76b4c1d6ad65ac4c2c10f3a2b3a"
|
||||
"shas": "c2396f508190956f31e2d361684e61d7c8a353c1..9f721d811c37ecf88048e0a128476731acceda72"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-interpolation-delete-rest-test",
|
||||
@ -534,5 +534,5 @@
|
||||
"-\"bar #{foo}\""
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "cf1a6e3114fde76b4c1d6ad65ac4c2c10f3a2b3a..ef8d34476c23317120bf744df9d41b9110a04c03"
|
||||
"shas": "9f721d811c37ecf88048e0a128476731acceda72..e3bf2ed1e31569b6093ee1fc86e4cc8340ca76d7"
|
||||
}]
|
||||
|
@ -37,7 +37,7 @@
|
||||
"+}"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "39e3abbd0e3332afc2314759fdd350cba39b8e28..39eba620219e1cc7172b218e7f7f4cc0b945515e"
|
||||
"shas": "6c8dc9471a192b2a2dbb0003b78e81330f92875e..0e3ad0bc035f4bef32cdae66364ff9e77ff366a9"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-lambda-dash-rocket-replacement-insert-test",
|
||||
@ -97,7 +97,7 @@
|
||||
" 2"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "39eba620219e1cc7172b218e7f7f4cc0b945515e..db5ebcd81ad82fbb223f7ba862191d01280823bd"
|
||||
"shas": "0e3ad0bc035f4bef32cdae66364ff9e77ff366a9..f72c36b166376c06a4c3c1494f2fba5d8e607db9"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-lambda-dash-rocket-delete-insert-test",
|
||||
@ -154,7 +154,7 @@
|
||||
" 2"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "db5ebcd81ad82fbb223f7ba862191d01280823bd..f31ea619acedac7aafa78d4821e3359c29837a2e"
|
||||
"shas": "f72c36b166376c06a4c3c1494f2fba5d8e607db9..3602c854baba05719e2473c2e770b0420fe3bdcb"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-lambda-dash-rocket-replacement-test",
|
||||
@ -211,7 +211,7 @@
|
||||
" 2"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "f31ea619acedac7aafa78d4821e3359c29837a2e..78558177fbe1e8a9b635366d37dca7bc63c35a89"
|
||||
"shas": "3602c854baba05719e2473c2e770b0420fe3bdcb..47e5dcb1ecb14a79fed814b95d909175b46d1c24"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-lambda-dash-rocket-delete-replacement-test",
|
||||
@ -288,7 +288,7 @@
|
||||
"+-> { foo }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "78558177fbe1e8a9b635366d37dca7bc63c35a89..1b5da246d2f7c8e084437f516a1e0acef8a668b5"
|
||||
"shas": "47e5dcb1ecb14a79fed814b95d909175b46d1c24..bb2c4d2481919ce99321894e0637fb887d11de53"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-lambda-dash-rocket-delete-test",
|
||||
@ -330,7 +330,7 @@
|
||||
" -> { foo }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "1b5da246d2f7c8e084437f516a1e0acef8a668b5..885c3dd4bc6b78521a51d05585cd3600901ebc5f"
|
||||
"shas": "bb2c4d2481919ce99321894e0637fb887d11de53..96809c020f43fc650541dc00e09e36bb97dd37f4"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-lambda-dash-rocket-delete-rest-test",
|
||||
@ -368,5 +368,5 @@
|
||||
"--> { foo }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "885c3dd4bc6b78521a51d05585cd3600901ebc5f..18022ae6ebbe9a88b3eaf0cfa0654e8f8bc5dd01"
|
||||
"shas": "96809c020f43fc650541dc00e09e36bb97dd37f4..80254f6fe46c2efb3b3eb51842964f6772d59995"
|
||||
}]
|
||||
|
@ -34,7 +34,7 @@
|
||||
"+lambda { foo }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "18022ae6ebbe9a88b3eaf0cfa0654e8f8bc5dd01..3056cfc87793da5967931201f46bc12dc4186bf5"
|
||||
"shas": "80254f6fe46c2efb3b3eb51842964f6772d59995..6dcc6a297321191fc8f1f452427dd34cf78911a4"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-lambda-replacement-insert-test",
|
||||
@ -89,7 +89,7 @@
|
||||
" lambda { foo }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "3056cfc87793da5967931201f46bc12dc4186bf5..a33da9171f4f363df081fa60a58279175ea6bbc7"
|
||||
"shas": "6dcc6a297321191fc8f1f452427dd34cf78911a4..0bbf66aa7dfd94a56466743c957a7de351c65b70"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-lambda-delete-insert-test",
|
||||
@ -142,7 +142,7 @@
|
||||
" lambda { foo }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "a33da9171f4f363df081fa60a58279175ea6bbc7..e52658a62a6c3953d8382d0296c267b2a9a3b3dc"
|
||||
"shas": "0bbf66aa7dfd94a56466743c957a7de351c65b70..1579cef8baeb2b625857892c03fafab484a4987a"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-lambda-replacement-test",
|
||||
@ -195,7 +195,7 @@
|
||||
" lambda { foo }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "e52658a62a6c3953d8382d0296c267b2a9a3b3dc..522cd601966aa3e9f5fc0f033f81cbefcd706669"
|
||||
"shas": "1579cef8baeb2b625857892c03fafab484a4987a..8c0a9223d2ac0f79f181eb11a248220584e2cc5e"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-lambda-delete-replacement-test",
|
||||
@ -266,7 +266,7 @@
|
||||
"+lambda { |x| x + 1 }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "522cd601966aa3e9f5fc0f033f81cbefcd706669..1f004455547e75075f1c16f62433c080571f69ae"
|
||||
"shas": "8c0a9223d2ac0f79f181eb11a248220584e2cc5e..9b06591b0137b440b6a2fe162a8b029da857d2d9"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-lambda-delete-test",
|
||||
@ -305,7 +305,7 @@
|
||||
" lambda { |x| x + 1 }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "1f004455547e75075f1c16f62433c080571f69ae..fb578efc5242fd49d72fc4e06e75adf0320ef31d"
|
||||
"shas": "9b06591b0137b440b6a2fe162a8b029da857d2d9..701b02a738b26f28aed4f1d0a067d5ab008f503c"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-lambda-delete-rest-test",
|
||||
@ -343,5 +343,5 @@
|
||||
"-lambda { |x| x + 1 }"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "fb578efc5242fd49d72fc4e06e75adf0320ef31d..b8e7a4d5034214328f3391e3c6001076f5bb6ec9"
|
||||
"shas": "701b02a738b26f28aed4f1d0a067d5ab008f503c..b55e70db0fed4efeb4bb9f9b7abd3bba675a1ec3"
|
||||
}]
|
||||
|
@ -98,7 +98,7 @@
|
||||
"+x **= 1"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "1965f9bdeebab8468bebb4f2c29230d3a42c255e..7c9d58241d4b18ce09a2b955af2bafa7c74982c0"
|
||||
"shas": "0f6cb87a146aa3332ff673d24b8c4756cad55afc..340fd37437887d2efee3a6316e184452dbe2721f"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-math-assignment-replacement-insert-test",
|
||||
@ -283,7 +283,7 @@
|
||||
" x *= 1"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "7c9d58241d4b18ce09a2b955af2bafa7c74982c0..77f634748f5b464e65820506739bcc6a626d81b9"
|
||||
"shas": "340fd37437887d2efee3a6316e184452dbe2721f..dea0d5a9f9b5eed83159a5d1b2cc06d0ac25cd64"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-math-assignment-delete-insert-test",
|
||||
@ -337,7 +337,7 @@
|
||||
" x /= 1"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "77f634748f5b464e65820506739bcc6a626d81b9..6440a1a1d8cc18d572ea627cb86b9be3f4dc5fa4"
|
||||
"shas": "dea0d5a9f9b5eed83159a5d1b2cc06d0ac25cd64..c9bd7f61a13dfb953d41e1b99d2870e2bcd03d49"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-math-assignment-replacement-test",
|
||||
@ -391,7 +391,7 @@
|
||||
" x /= 1"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "6440a1a1d8cc18d572ea627cb86b9be3f4dc5fa4..68a0167bd4f2dc5c50eef89de25c6f8756a5f101"
|
||||
"shas": "c9bd7f61a13dfb953d41e1b99d2870e2bcd03d49..24732038442e16f94cfdc7a35526e4d7b73cb730"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-math-assignment-delete-replacement-test",
|
||||
@ -533,7 +533,7 @@
|
||||
" x /= 1"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "68a0167bd4f2dc5c50eef89de25c6f8756a5f101..f2ef306509a3a836a1c92fe0a1424d07689f6ed8"
|
||||
"shas": "24732038442e16f94cfdc7a35526e4d7b73cb730..fea8ab8c661173c7f6847ef55ddc940074e86a1c"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-math-assignment-delete-test",
|
||||
@ -638,7 +638,7 @@
|
||||
" x *= 1"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "f2ef306509a3a836a1c92fe0a1424d07689f6ed8..baf89bf25b9b1f5ce42086e5175f7803db41fce6"
|
||||
"shas": "fea8ab8c661173c7f6847ef55ddc940074e86a1c..5f1518a1190ff29e7afb78e85dfa40cc4801f812"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-math-assignment-delete-rest-test",
|
||||
@ -740,5 +740,5 @@
|
||||
"-x **= 1"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "baf89bf25b9b1f5ce42086e5175f7803db41fce6..bba90b67e00732e5f4f32a72f7b6b131d33dd30e"
|
||||
"shas": "5f1518a1190ff29e7afb78e85dfa40cc4801f812..7c923dd9edc785cfae17ddf168ca4f063c7e7604"
|
||||
}]
|
||||
|
@ -34,7 +34,7 @@
|
||||
"+foo(:bar => true)"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "0b8859a7463c7f7199a43896da33717a33adb581..7a3b7b95e6772f9bbf12b2652d9e6b0543bbc3a9"
|
||||
"shas": "0e49e13e3453f7edca8a126ec0c14f461ff68d2f..380d4a59a54fa8dd55fbf3e9840d9e6ce1b0c0f1"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-calls-hash-args-replacement-insert-test",
|
||||
@ -89,7 +89,7 @@
|
||||
" foo(:bar => true)"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "7a3b7b95e6772f9bbf12b2652d9e6b0543bbc3a9..320658998fd4ee2f996c588145b11f7e5dd7cadc"
|
||||
"shas": "380d4a59a54fa8dd55fbf3e9840d9e6ce1b0c0f1..975b6926a60c4aec718e994742f23b85eaa1f845"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-calls-hash-args-delete-insert-test",
|
||||
@ -130,7 +130,7 @@
|
||||
" foo(:bar => true)"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "320658998fd4ee2f996c588145b11f7e5dd7cadc..da4df9f65cee9943106807788bf7af9beccc0188"
|
||||
"shas": "975b6926a60c4aec718e994742f23b85eaa1f845..a8a0eec687e5f732303004a27997de5a7e72953e"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-calls-hash-args-replacement-test",
|
||||
@ -171,7 +171,7 @@
|
||||
" foo(:bar => true)"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "da4df9f65cee9943106807788bf7af9beccc0188..77b4ab53916c053c65b82af83196dfa72e09381d"
|
||||
"shas": "a8a0eec687e5f732303004a27997de5a7e72953e..278ce6982d8b846d5317d0fcda7d9fd5b277a96a"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-calls-hash-args-delete-replacement-test",
|
||||
@ -242,7 +242,7 @@
|
||||
"+foo(:bar => true, :baz => 1)"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "77b4ab53916c053c65b82af83196dfa72e09381d..ee4cd57d64dd1364a7c327c041537d4cbfe6dd41"
|
||||
"shas": "278ce6982d8b846d5317d0fcda7d9fd5b277a96a..64d73d2a93d05a444d53b04ff8b6b4359ffa4726"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-calls-hash-args-delete-test",
|
||||
@ -281,7 +281,7 @@
|
||||
" foo(:bar => true, :baz => 1)"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "ee4cd57d64dd1364a7c327c041537d4cbfe6dd41..52b0d3ce05c4cac541b0a92675582e76547e1c37"
|
||||
"shas": "64d73d2a93d05a444d53b04ff8b6b4359ffa4726..7a84a66e13fa9c093a32421d1c592b7f4a77cf95"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-calls-hash-args-delete-rest-test",
|
||||
@ -319,5 +319,5 @@
|
||||
"-foo(:bar => true, :baz => 1)"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "52b0d3ce05c4cac541b0a92675582e76547e1c37..3ab5bd23eb0228069d84c0fedf7b60c8fe25a1a5"
|
||||
"shas": "7a84a66e13fa9c093a32421d1c592b7f4a77cf95..ebc16e531db91e278be158e0331d53d4662ad941"
|
||||
}]
|
||||
|
@ -34,7 +34,7 @@
|
||||
"+foo(bar: true)"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "0651effd0edd3aa8236a13e8055ccdb61e376131..56719719ba8f3aaf1b6c9cc0caa0d8e44a8b7e3c"
|
||||
"shas": "8fd9b6bcf4028fca906c02d8e834004fbfdbd046..1e47e299825cff5b9e147ee2b034b503e3a23132"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-calls-keyword-args-replacement-insert-test",
|
||||
@ -89,7 +89,7 @@
|
||||
" foo(bar: true)"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "56719719ba8f3aaf1b6c9cc0caa0d8e44a8b7e3c..b139da0f753052390f6adc2b640a1afb05b5c476"
|
||||
"shas": "1e47e299825cff5b9e147ee2b034b503e3a23132..d618a3fe3a065468bbe786f8ca02212c0b95cd25"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-calls-keyword-args-delete-insert-test",
|
||||
@ -130,7 +130,7 @@
|
||||
" foo(bar: true)"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "b139da0f753052390f6adc2b640a1afb05b5c476..2f1f54a8fc3fc6c782164a655d44301022cd1696"
|
||||
"shas": "d618a3fe3a065468bbe786f8ca02212c0b95cd25..44bf2ae7602cc00c0cb39d837ddd15922ec01dea"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-calls-keyword-args-replacement-test",
|
||||
@ -171,7 +171,7 @@
|
||||
" foo(bar: true)"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "2f1f54a8fc3fc6c782164a655d44301022cd1696..2dd2410e9edd9ad49ea2e990aab44fc4becd053b"
|
||||
"shas": "44bf2ae7602cc00c0cb39d837ddd15922ec01dea..973e0c42fd3e5abe68ff79fe3164adff56d25ed2"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-calls-keyword-args-delete-replacement-test",
|
||||
@ -242,7 +242,7 @@
|
||||
"+foo(bar: true, baz: 1)"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "2dd2410e9edd9ad49ea2e990aab44fc4becd053b..52d301081db424529069b6e773de3e8977fff9f2"
|
||||
"shas": "973e0c42fd3e5abe68ff79fe3164adff56d25ed2..96918e895e720422df10f0c0e00aeae9b6cde5f3"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-calls-keyword-args-delete-test",
|
||||
@ -281,7 +281,7 @@
|
||||
" foo(bar: true, baz: 1)"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "52d301081db424529069b6e773de3e8977fff9f2..a2ff4c6ff0d3abb9b94c9369286cd74e20f26673"
|
||||
"shas": "96918e895e720422df10f0c0e00aeae9b6cde5f3..a50ac4461308145e10c775f4a81dc8bf63055084"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-calls-keyword-args-delete-rest-test",
|
||||
@ -319,5 +319,5 @@
|
||||
"-foo(bar: true, baz: 1)"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "a2ff4c6ff0d3abb9b94c9369286cd74e20f26673..0b8859a7463c7f7199a43896da33717a33adb581"
|
||||
"shas": "a50ac4461308145e10c775f4a81dc8bf63055084..0e49e13e3453f7edca8a126ec0c14f461ff68d2f"
|
||||
}]
|
||||
|
@ -34,7 +34,7 @@
|
||||
"+x.foo()"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "bc06c5994d9bcf120ff71c6dd145f5341d84cec3..9cafd760d2dc4c2a54921571ba6d7cb2fcee8635"
|
||||
"shas": "299869efc374b8413a3edf91e6ebc2e849fc7407..20531c76e9ef8d1cb0295548df44086f526e887b"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-calls-replacement-insert-test",
|
||||
@ -89,7 +89,7 @@
|
||||
" x.foo()"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "9cafd760d2dc4c2a54921571ba6d7cb2fcee8635..a7bb32b35cc3fa930f0fb34803d6dbdaa8282d6a"
|
||||
"shas": "20531c76e9ef8d1cb0295548df44086f526e887b..75953aeb6a83571263e30b5a466488010df4ef65"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-calls-delete-insert-test",
|
||||
@ -142,7 +142,7 @@
|
||||
" x.foo()"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "a7bb32b35cc3fa930f0fb34803d6dbdaa8282d6a..85b889092acf870dd2e172e6aea86acc7e84e807"
|
||||
"shas": "75953aeb6a83571263e30b5a466488010df4ef65..2c338816ca38184ebeed065cd0b3483f9ef3f25f"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-calls-replacement-test",
|
||||
@ -195,7 +195,7 @@
|
||||
" x.foo()"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "85b889092acf870dd2e172e6aea86acc7e84e807..5cae15619e9bdf86d95a0d54d3c5e184101e45f9"
|
||||
"shas": "2c338816ca38184ebeed065cd0b3483f9ef3f25f..1ed061ce3173113b0970f8069cef959c36ab4fdc"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-calls-delete-replacement-test",
|
||||
@ -266,7 +266,7 @@
|
||||
"+bar()"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "5cae15619e9bdf86d95a0d54d3c5e184101e45f9..6b6f652b4bd7788b57a21ffd7310343dbf6f8274"
|
||||
"shas": "1ed061ce3173113b0970f8069cef959c36ab4fdc..2c951b1de15738a98708277ba0638ec85aecd8e9"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-calls-delete-test",
|
||||
@ -305,7 +305,7 @@
|
||||
" bar()"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "6b6f652b4bd7788b57a21ffd7310343dbf6f8274..d65baeb30a8f39878e17e8ed91de19134f60923b"
|
||||
"shas": "2c951b1de15738a98708277ba0638ec85aecd8e9..321b88fa171035a88721e26445ce03e7c9cc552b"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-calls-delete-rest-test",
|
||||
@ -343,5 +343,5 @@
|
||||
"-bar()"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "d65baeb30a8f39878e17e8ed91de19134f60923b..5c66ec3700761ca4868e703f576449f5a190e5a5"
|
||||
"shas": "321b88fa171035a88721e26445ce03e7c9cc552b..8fd9b6bcf4028fca906c02d8e834004fbfdbd046"
|
||||
}]
|
||||
|
@ -35,7 +35,7 @@
|
||||
"+end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "437e6574dec68736434b48abcb9528f40c43beaf..27094bfe6d75b44ade44fdb8eff16d2ab65c1596"
|
||||
"shas": "b3edb3f4a99e8c2e595bfd6ddb195a01fdd8f573..b1b0f7fab421afde00aa6d1b5efe1dc3fc02b3bd"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-declaration-keyword-param-replacement-insert-test",
|
||||
@ -93,7 +93,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "27094bfe6d75b44ade44fdb8eff16d2ab65c1596..e996c0960b54b737330760deb07c1b3f8d61e71f"
|
||||
"shas": "b1b0f7fab421afde00aa6d1b5efe1dc3fc02b3bd..8bb0b1c60471de84e7037bd5cff85b2979944b89"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-declaration-keyword-param-delete-insert-test",
|
||||
@ -135,7 +135,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "e996c0960b54b737330760deb07c1b3f8d61e71f..f803a8f6472ac578c23c4911fd467e15ab1d4fba"
|
||||
"shas": "8bb0b1c60471de84e7037bd5cff85b2979944b89..88507aa1ef8540bf6b630a0c48291bf871e12fc4"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-declaration-keyword-param-replacement-test",
|
||||
@ -177,7 +177,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "f803a8f6472ac578c23c4911fd467e15ab1d4fba..5fbd7ee48b8fd4d8ec416605b2f03170d9971b67"
|
||||
"shas": "88507aa1ef8540bf6b630a0c48291bf871e12fc4..99b4d01a982126ad21a3eae88f23a8d2cfc7fe71"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-declaration-keyword-param-delete-replacement-test",
|
||||
@ -251,7 +251,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "5fbd7ee48b8fd4d8ec416605b2f03170d9971b67..77064c7fdc9d2e27840dd3b6e8e4cb180e5e7a52"
|
||||
"shas": "99b4d01a982126ad21a3eae88f23a8d2cfc7fe71..96f76e626627010848d601f753e46994b408db90"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-declaration-keyword-param-delete-test",
|
||||
@ -292,7 +292,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "77064c7fdc9d2e27840dd3b6e8e4cb180e5e7a52..341c920b20a69533d26933c5d9ee7d1b678e32d8"
|
||||
"shas": "96f76e626627010848d601f753e46994b408db90..e01819fe6134eee044e699c4795d69985254fd44"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-declaration-keyword-param-delete-rest-test",
|
||||
@ -331,5 +331,5 @@
|
||||
"-end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "341c920b20a69533d26933c5d9ee7d1b678e32d8..2e5ef49d470de6e07c6fe7214b247889376f1d36"
|
||||
"shas": "e01819fe6134eee044e699c4795d69985254fd44..94e12ff958b9acab76bca28dda5ddc409b164acd"
|
||||
}]
|
||||
|
@ -35,7 +35,7 @@
|
||||
"+end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "938fb81e6b5297c94aadee8461ad3865bb339a0b..948b510af8ca32d31fa2cd7297873c21c4293912"
|
||||
"shas": "94e12ff958b9acab76bca28dda5ddc409b164acd..ba97939163ba5be7d2eb42968d3a7b1da61fa807"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-declaration-param-default-replacement-insert-test",
|
||||
@ -93,7 +93,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "948b510af8ca32d31fa2cd7297873c21c4293912..2b02e88e16ec50494edff125de7d16af87ed8043"
|
||||
"shas": "ba97939163ba5be7d2eb42968d3a7b1da61fa807..46c7958d9fa78d9dbbf8b170744a5952f8725213"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-declaration-param-default-delete-insert-test",
|
||||
@ -135,7 +135,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "2b02e88e16ec50494edff125de7d16af87ed8043..c77fe0f8270d9d4535af506826b3266b2e363677"
|
||||
"shas": "46c7958d9fa78d9dbbf8b170744a5952f8725213..43b130865f05441230a5838f91e3eddb8a0c2106"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-declaration-param-default-replacement-test",
|
||||
@ -177,7 +177,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "c77fe0f8270d9d4535af506826b3266b2e363677..586202de2bc56e65a3f24f0fd533d9758b09df9b"
|
||||
"shas": "43b130865f05441230a5838f91e3eddb8a0c2106..778abb4e3706bc38a64be199c511fbc73b437495"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-declaration-param-default-delete-replacement-test",
|
||||
@ -251,7 +251,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "586202de2bc56e65a3f24f0fd533d9758b09df9b..e6b2d95dfc0d76bad56db6ad26c2df6e72f6e840"
|
||||
"shas": "778abb4e3706bc38a64be199c511fbc73b437495..f5a55f21924d4fd3d0a63199eb49bd62b46de97e"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-declaration-param-default-delete-test",
|
||||
@ -292,7 +292,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "e6b2d95dfc0d76bad56db6ad26c2df6e72f6e840..46fb7103f253c1cce02d27305a2d0305f1275990"
|
||||
"shas": "f5a55f21924d4fd3d0a63199eb49bd62b46de97e..c32d5d100b0d3904ab67d6043046d9a7499c6542"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-declaration-param-default-delete-rest-test",
|
||||
@ -331,5 +331,5 @@
|
||||
"-end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "46fb7103f253c1cce02d27305a2d0305f1275990..3bb1c281d994cc6dc7ae3b4123ecfe7bc4e9a4ad"
|
||||
"shas": "c32d5d100b0d3904ab67d6043046d9a7499c6542..3decd374dbdad637d9d37d838e6885ed93890718"
|
||||
}]
|
||||
|
@ -35,7 +35,7 @@
|
||||
"+end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "f82bf4ad6ff1fbd5a9259bd1eacc5a0f4f859641..0197e7f75970a0d4fb4ac2094b70667322cd28f7"
|
||||
"shas": "f1b6bbddd7c59150a9f8c15746168a84eb3d12cd..9c67c3d54b1988f9dc9d36d133263fb55392f5a5"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-declaration-params-insert-test",
|
||||
@ -75,7 +75,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "0197e7f75970a0d4fb4ac2094b70667322cd28f7..552d3174c07720ca6e22d4d10793d77b8cbd8272"
|
||||
"shas": "9c67c3d54b1988f9dc9d36d133263fb55392f5a5..fa52999f22ea2db5ec6279edc1ce6923b03fa112"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-declaration-params-replacement-test",
|
||||
@ -130,7 +130,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "552d3174c07720ca6e22d4d10793d77b8cbd8272..d1de60658c07241f71d613af600c1182ae93d5ee"
|
||||
"shas": "fa52999f22ea2db5ec6279edc1ce6923b03fa112..0066f7111989f8c16984b561886143c96ccfc653"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-declaration-params-delete-replacement-test",
|
||||
@ -185,7 +185,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "d1de60658c07241f71d613af600c1182ae93d5ee..9dbfbeb8ecb62a12415834b6b4d6acb2c25248e1"
|
||||
"shas": "0066f7111989f8c16984b561886143c96ccfc653..f6bbfebf7315403e68eeeb74b59c36c02d96aca7"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-declaration-params-delete-insert-test",
|
||||
@ -225,7 +225,7 @@
|
||||
" end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "9dbfbeb8ecb62a12415834b6b4d6acb2c25248e1..104d7b89ddba1700c8472a8622398479e4b75428"
|
||||
"shas": "f6bbfebf7315403e68eeeb74b59c36c02d96aca7..b3f6954afea9828fb56e8dc8bd2f11fc3385f827"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "ruby-method-declaration-params-teardown-test",
|
||||
@ -264,5 +264,5 @@
|
||||
"-end"
|
||||
],
|
||||
"gitDir": "test/corpus/repos/ruby",
|
||||
"shas": "104d7b89ddba1700c8472a8622398479e4b75428..38847e533e9d63b067fd46b4e3bf8e4bcd68f0db"
|
||||
"shas": "b3f6954afea9828fb56e8dc8bd2f11fc3385f827..90b769d2ee1bd1b62ce2da0ff8b1574c43cca4ec"
|
||||
}]
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user