github.com/graybobo/golang.org-package-offline-cache@v0.0.0-20200626051047-6608995c132f/x/image/math/fixed/fixed_test.go (about) 1 // Copyright 2015 The Go 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 fixed 6 7 import ( 8 "testing" 9 ) 10 11 func TestInt26_6(t *testing.T) { 12 got := Int26_6(1<<6 + 1<<4).String() 13 want := "1:16" 14 if got != want { 15 t.Fatalf("got %q, want %q", got, want) 16 } 17 } 18 19 func TestInt52_12(t *testing.T) { 20 got := Int52_12(1<<12 + 1<<10).String() 21 want := "1:1024" 22 if got != want { 23 t.Fatalf("got %q, want %q", got, want) 24 } 25 }