forked from joejulian/gio
3b6646933d
The rendering implementation is needed for using Gio UI with external window libraries such as GLFW. Expose it in the new package gpu. Updates #26 Signed-off-by: Elias Naur <mail@eliasnaur.com>
19 lines
289 B
Go
19 lines
289 B
Go
package gl
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestGoString(t *testing.T) {
|
|
tests := [][2]string{
|
|
{"Hello\x00", "Hello"},
|
|
{"\x00", ""},
|
|
}
|
|
for _, test := range tests {
|
|
got := GoString([]byte(test[0]))
|
|
if exp := test[1]; exp != got {
|
|
t.Errorf("expected %q got %q", exp, got)
|
|
}
|
|
}
|
|
}
|