github.com/biogo/biogo@v1.0.4/feat/moltype_test.go (about) 1 // Copyright ©2011-2013 The bíogo Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package feat 6 7 import ( 8 "gopkg.in/check.v1" 9 ) 10 11 // Tests 12 func (s *S) TestMoltype(c *check.C) { 13 for i, s := range moltypeToString { 14 c.Check(Moltype(i).String(), check.Equals, s) 15 c.Check(ParseMoltype(s), check.Equals, Moltype(i)) 16 c.Check(ParseMoltype(s+"salt"), check.Equals, Undefined) 17 } 18 }