Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
winoros committed Aug 21, 2018
1 parent 643b09c commit cb3b927
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions plan/logical_plans_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 PingCAP, Inc.
// Copyright 2018 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -33,7 +33,7 @@ type testUnitTestSuit struct {
ctx sessionctx.Context
}

func (s *testUnitTestSuit) SetUpSuite(col3 *C) {
func (s *testUnitTestSuit) SetUpSuite(c *C) {
s.ctx = mockContext()
}

Expand Down Expand Up @@ -66,8 +66,8 @@ func (s *testUnitTestSuit) SubstituteCol2CorCol(expr expression.Expression, colI
return expr, nil
}

func (s *testUnitTestSuit) TestIndexPathSplitCorColCond(col3 *C) {
defer testleak.AfterTest(col3)()
func (s *testUnitTestSuit) TestIndexPathSplitCorColCond(c *C) {
defer testleak.AfterTest(c)()
totalSchema := expression.NewSchema()
totalSchema.Append(&expression.Column{
ColName: model.NewCIStr("col1"),
Expand Down Expand Up @@ -173,15 +173,15 @@ func (s *testUnitTestSuit) TestIndexPathSplitCorColCond(col3 *C) {
if sf, ok := filters[0].(*expression.ScalarFunction); ok && sf.FuncName.L == ast.LogicAnd {
filters = expression.FlattenCNFConditions(sf)
}
col3.Assert(err, IsNil, comment)
c.Assert(err, IsNil, comment)
trueFilters := make([]expression.Expression, 0, len(filters))
idMap := make(map[int]struct{})
for _, id := range tt.corColIDs {
idMap[id] = struct{}{}
}
for _, filter := range filters {
trueFilter, err := s.SubstituteCol2CorCol(filter, idMap)
col3.Assert(err, IsNil, comment)
c.Assert(err, IsNil, comment)
trueFilters = append(trueFilters, trueFilter)
}
path := accessPath{
Expand All @@ -191,7 +191,7 @@ func (s *testUnitTestSuit) TestIndexPathSplitCorColCond(col3 *C) {
idxColLens: tt.idxColLens,
}
access, remained := path.splitCorColAccessCondFromFilters()
col3.Assert(fmt.Sprintf("%s", access), Equals, tt.access, comment)
col3.Assert(fmt.Sprintf("%s", remained), Equals, tt.remained, comment)
c.Assert(fmt.Sprintf("%s", access), Equals, tt.access, comment)
c.Assert(fmt.Sprintf("%s", remained), Equals, tt.remained, comment)
}
}

0 comments on commit cb3b927

Please sign in to comment.