FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
PikaPython/packtool-test.cpp at master · IVOES/PikaPython · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
IVOES
/
PikaPython
Public
forked from
pikasTech/PikaPython
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
PikaPython
/
packtool-test.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
33 lines (24 loc) · 895 Bytes
Breadcrumbs
PikaPython
/
packtool-test.cpp
Copy path
File metadata and controls
33 lines (24 loc) · 895 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include
"test_common.h"
TEST_START
#include
"PikaCompiler.h"
TEST
(
packtool
,
unpack
) {
PIKA_RES
res
=
LibObj_unpackFileToPath
(
"test/assets/a.pack"
,
"test/out/unpackout"
);
EXPECT_EQ
(
res
,
PIKA_RES_OK
);
}
TEST
(
packtool
,
packread
) {
size_t
n
=
0
;
//Arg* fileArg = NULL;
pikafs_FILE
*
pack_file
=
pikafs_fopen_pack
(
"test/assets/a.pack"
,
"main.py"
);
// pikafs_FILE* pack_file = pikafs_fopen_pack_new(&fileArg, "test/assets/a.pack", "main.py");
FILE
*
file
=
pika_platform_fopen
(
"test/out/unpackout/main2.py"
,
"wb+"
);
if
(
NULL
==
file
) {
pika_platform_printf
(
"open file: %s error\r\n"
,
"test/out/unpackout/main2.py"
);
}
n
=
pika_platform_fwrite
(
pack_file
->
addr
,
pack_file
->
size
,
1
,
file
);
EXPECT_NE
(
n
,
0
);
//arg_deinit(fileArg);
pikaFree
(
pack_file
,
sizeof
(
pikafs_FILE
));
pika_platform_fclose
(
file
);
pack_file
=
NULL
;
}
TEST_END
Back
|
FazBrowse Home
|
New Git URL