zcldec: test that all Spec types actually implement the interface

This commit is contained in:
Martin Atkins 2017-07-17 16:54:24 -07:00
parent ade2a149ef
commit 4df9fd1372

13
zcldec/spec_test.go Normal file
View File

@ -0,0 +1,13 @@
package zcldec
// Verify that all of our spec types implement the necessary interfaces
var objectSpecAsSpec Spec = ObjectSpec(nil)
var tupleSpecAsSpec Spec = TupleSpec(nil)
var attrSpecAsSpec Spec = (*AttrSpec)(nil)
var literalSpecAsSpec Spec = (*LiteralSpec)(nil)
var exprSpecAsSpec Spec = (*ExprSpec)(nil)
var blockSpecAsSpec Spec = (*BlockSpec)(nil)
var blockListSpecAsSpec Spec = (*BlockListSpec)(nil)
var blockSetSpecAsSpec Spec = (*BlockSetSpec)(nil)
var blockMapSpecAsSpec Spec = (*BlockMapSpec)(nil)
var blockLabelSpecAsSpec Spec = (*BlockLabelSpec)(nil)