summaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/golang.org/x/image/math/fixed/fixed_test.go
blob: e252de7cb8deb8eea780b67a5262a9c0870662d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package fixed

import (
	"testing"
)

func TestInt26_6(t *testing.T) {
	got := Int26_6(1<<6 + 1<<4).String()
	want := "1:16"
	if got != want {
		t.Fatalf("got %q, want %q", got, want)
	}
}

func TestInt52_12(t *testing.T) {
	got := Int52_12(1<<12 + 1<<10).String()
	want := "1:1024"
	if got != want {
		t.Fatalf("got %q, want %q", got, want)
	}
}