File: misc_test.go

package info (click to toggle)
golang-github-abbot-go-http-auth 0.0~git20150714.0.46b9627-1~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 144 kB
  • sloc: makefile: 16
file content (12 lines) | stat: -rw-r--r-- 260 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
package auth

import "testing"

func TestH(t *testing.T) {
	const hello = "Hello, world!"
	const hello_md5 = "6cd3556deb0da54bca060b4c39479839"
	h := H(hello)
	if h != hello_md5 {
		t.Fatal("Incorrect digest for test string:", h, "instead of", hello_md5)
	}
}