Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-block-format
Commits
f524411f
Commit
f524411f
authored
Sep 15, 2014
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add basic test for blocks package #59 (actually add file)
parent
ab55ab95
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
blocks_test.go
blocks_test.go
+25
-0
No files found.
blocks_test.go
0 → 100644
View file @
f524411f
package
blocks
import
"testing"
func
TestBlocksBasic
(
t
*
testing
.
T
)
{
// Test empty data
empty
:=
[]
byte
{}
_
,
err
:=
NewBlock
(
empty
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
// Test nil case
_
,
err
=
NewBlock
(
nil
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
// Test some data
_
,
err
=
NewBlock
([]
byte
(
"Hello world!"
))
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment