FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
node_pcap/spec/util.spec.js at master · gitqueue/node_pcap · GitHub
gitqueue
/
node_pcap
Public
forked from
node-pcap/node_pcap
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
node_pcap
/
spec
/
util.spec.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
35 lines (34 loc) · 1.39 KB
Breadcrumbs
node_pcap
/
spec
/
util.spec.js
Copy path
File metadata and controls
35 lines (34 loc) · 1.39 KB
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
34
35
var
util
=
require
(
"../util"
)
;
require
(
"should"
)
;
describe
(
"util"
,
function
(
)
{
describe
(
"int8_to_hex"
,
function
(
)
{
it
(
"is an array where uint8 values are the indices"
,
function
(
)
{
util
.
int8_to_hex
.
should
.
be
.
instanceof
(
Array
)
.
and
.
have
.
lengthOf
(
256
)
;
}
)
;
it
(
"maps uint8 values to hex strings e.g. [0]==\"00\""
,
function
(
)
{
util
.
int8_to_hex
[
0
]
.
should
.
be
.
exactly
(
"00"
)
;
util
.
int8_to_hex
[
255
]
.
should
.
be
.
exactly
(
"ff"
)
;
util
.
int8_to_hex
[
1
]
.
should
.
be
.
exactly
(
"01"
)
;
}
)
;
}
)
;
describe
(
"int8_to_dec"
,
function
(
)
{
it
(
"is an array where uint8 values are the indices"
,
function
(
)
{
util
.
int8_to_dec
.
should
.
be
.
instanceof
(
Array
)
.
and
.
have
.
lengthOf
(
256
)
;
}
)
;
it
(
"maps uint8 values to decimal strings e.g. [0]==\"0\""
,
function
(
)
{
util
.
int8_to_dec
[
0
]
.
should
.
be
.
exactly
(
"0"
)
;
util
.
int8_to_dec
[
255
]
.
should
.
be
.
exactly
(
"255"
)
;
util
.
int8_to_dec
[
1
]
.
should
.
be
.
exactly
(
"1"
)
;
}
)
;
}
)
;
describe
(
"int8_to_hex_nopad"
,
function
(
)
{
it
(
"is an array where uint8 values are the indices"
,
function
(
)
{
util
.
int8_to_hex_nopad
.
should
.
be
.
instanceof
(
Array
)
.
and
.
have
.
lengthOf
(
256
)
;
}
)
;
it
(
"maps uint8 values to hex strings without the leading 0 e.g. [0]==\"0\""
,
function
(
)
{
util
.
int8_to_hex_nopad
[
0
]
.
should
.
be
.
exactly
(
"0"
)
;
util
.
int8_to_hex_nopad
[
255
]
.
should
.
be
.
exactly
(
"ff"
)
;
util
.
int8_to_hex_nopad
[
1
]
.
should
.
be
.
exactly
(
"1"
)
;
}
)
;
}
)
;
}
)
;
Back
|
FazBrowse Home
|
New Git URL