You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
276 B
15 lines
276 B
4 years ago
|
package hal
|
||
|
|
||
|
import (
|
||
|
"github.com/stretchr/testify/assert"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestAddress(t *testing.T) {
|
||
|
// 000010 | 0000000011
|
||
|
address := Address(0b0000100000000011)
|
||
|
|
||
|
assert.Equal(t, uint16(0b10), address.PageNumber())
|
||
|
assert.Equal(t, uint16(0b11), address.Offset())
|
||
|
}
|