Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BDIO.jl
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alberto Ramos
BDIO.jl
Commits
5d6b2f9d
Commit
5d6b2f9d
authored
Jun 28, 2020
by
Alberto Ramos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added second test
parent
720170b1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
0 deletions
+51
-0
test/runtests.jl
test/runtests.jl
+3
-0
test/test2.jl
test/test2.jl
+48
-0
No files found.
test/runtests.jl
View file @
5d6b2f9d
...
@@ -6,3 +6,6 @@ using Test
...
@@ -6,3 +6,6 @@ using Test
println
(
"Test [test1.jl]"
)
println
(
"Test [test1.jl]"
)
@time
@test
include
(
"test1.jl"
)
@time
@test
include
(
"test1.jl"
)
println
(
"Test [test2.jl]"
)
@time
@test
include
(
"test2.jl"
)
test/test2.jl
0 → 100644
View file @
5d6b2f9d
BDIO_set_user
(
"alberto"
)
BDIO_set_host
(
"laptop"
)
fb
=
BDIO_open
(
"foo.bdio"
,
"w"
,
"Test file"
)
BDIO_start_record!
(
fb
,
BDIO_BIN_INT64LE
,
1
,
true
)
BDIO_write!
(
fb
,
collect
(
1
:
1000
))
BDIO_write_hash!
(
fb
)
BDIO_start_record!
(
fb
,
BDIO_BIN_F64LE
,
2
,
true
)
vec1
=
randn
(
1000
)
vec2
=
similar
(
vec1
)
vec2
.=
.-
vec1
BDIO_write!
(
fb
,
vec1
)
BDIO_write!
(
fb
,
vec2
)
BDIO_write_hash!
(
fb
)
BDIO_close!
(
fb
)
fb2
=
BDIO_open
(
"foo.bdio"
,
"r"
)
let
isum
::
Int64
=
0
,
fsum
::
Float64
=
0.0
while
BDIO_seek!
(
fb2
)
if
BDIO_get_uinfo
(
fb2
)
==
1
idt
=
similar
(
Array
{
Int64
,
1
},
100
)
for
i
=
1
:
10
BDIO_read
(
fb2
,
idt
)
isum
+=
sum
(
idt
)
end
elseif
BDIO_get_uinfo
(
fb2
)
==
2
fdt
=
similar
(
Array
{
Float64
,
1
},
100
)
for
i
=
1
:
20
BDIO_read
(
fb2
,
fdt
)
fsum
+=
sum
(
fdt
)
end
end
end
end
rm
(
"foo.bdio"
,
force
=
true
)
(
(
abs
(
fsum
)
<
1.0E-10
)
&&
((
2
*
isum
-
1000
*
(
1001
))
==
0
)
)
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