github.com/whtcorpsinc/MilevaDB-Prod@v0.0.0-20211104133533-f57f4be3b597/interlock/aggfuncs/func_stddevpop_test.go (about)

     1  package aggfuncs_test
     2  
     3  import (
     4  	. "github.com/whtcorpsinc/check"
     5  	"github.com/whtcorpsinc/BerolinaSQL/ast"
     6  	"github.com/whtcorpsinc/BerolinaSQL/allegrosql"
     7  )
     8  
     9  func (s *testSuite) TestMergePartialResult4Stddevpop(c *C) {
    10  	tests := []aggTest{
    11  		builPosetDaggTester(ast.AggFuncStddevPop, allegrosql.TypeDouble, 5, 1.4142135623730951, 0.816496580927726, 1.3169567191065923),
    12  	}
    13  	for _, test := range tests {
    14  		s.testMergePartialResult(c, test)
    15  	}
    16  }
    17  
    18  func (s *testSuite) TestStddevpop(c *C) {
    19  	tests := []aggTest{
    20  		builPosetDaggTester(ast.AggFuncStddevPop, allegrosql.TypeDouble, 5, nil, 1.4142135623730951),
    21  	}
    22  	for _, test := range tests {
    23  		s.testAggFunc(c, test)
    24  	}
    25  }