File: opcodes_test.go

package info (click to toggle)
mtail 3.2.24-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,384 kB
  • sloc: yacc: 647; makefile: 226; sh: 78; lisp: 77; awk: 17
file content (14 lines) | stat: -rw-r--r-- 345 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Copyright 2018 Google Inc. All Rights Reserved.
// This file is available under the Apache license.

package code

import "testing"

func TestOpcodeHasString(t *testing.T) {
	for o := Bad; o < lastOpcode; o++ {
		if o.String() != opNames[o] {
			t.Errorf("opcode string not match.  Expected %s, received %s", opNames[o], o.String())
		}
	}
}