github.com/XiaoMi/Gaea@v1.2.5/mysql/type_test.go (about) 1 // Copyright 2015 PingCAP, Inc. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // See the License for the specific language governing permissions and 12 // limitations under the License. 13 14 package mysql 15 16 import ( 17 "github.com/pingcap/check" 18 ) 19 20 var _ = check.Suite(&testTypeSuite{}) 21 22 type testTypeSuite struct{} 23 24 func (s *testTypeSuite) TestFlags(c *check.C) { 25 c.Assert(HasNotNullFlag(NotNullFlag), check.IsTrue) 26 c.Assert(HasUniKeyFlag(UniqueKeyFlag), check.IsTrue) 27 c.Assert(HasNotNullFlag(NotNullFlag), check.IsTrue) 28 c.Assert(HasNoDefaultValueFlag(NoDefaultValueFlag), check.IsTrue) 29 c.Assert(HasAutoIncrementFlag(AutoIncrementFlag), check.IsTrue) 30 c.Assert(HasUnsignedFlag(UnsignedFlag), check.IsTrue) 31 c.Assert(HasZerofillFlag(ZerofillFlag), check.IsTrue) 32 c.Assert(HasBinaryFlag(BinaryFlag), check.IsTrue) 33 c.Assert(HasPriKeyFlag(PriKeyFlag), check.IsTrue) 34 c.Assert(HasMultipleKeyFlag(MultipleKeyFlag), check.IsTrue) 35 c.Assert(HasTimestampFlag(TimestampFlag), check.IsTrue) 36 c.Assert(HasOnUpdateNowFlag(OnUpdateNowFlag), check.IsTrue) 37 }