1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

crypto.rand: cleanup test, make it less likely to fail in CI

This commit is contained in:
Delyan Angelov
2020-06-01 07:48:51 +03:00
parent 11e6734912
commit 97b9ce04a4
3 changed files with 52 additions and 48 deletions

View File

@@ -364,16 +364,6 @@ pub fn (nn byteptr) str() string {
// ----- utilities functions -----
pub fn (a []byte) contains(val byte) bool {
for aa in a {
if aa == val {
return true
}
}
return false
}
/*
pub fn (c rune) str() string {
fst_byte := int(c)>>8 * 3 & 0xff
@@ -413,3 +403,33 @@ pub fn (b []byte) clone() []byte {
return res
}
// TODO generic
pub fn (a []byte) contains(val byte) bool {
for aa in a {
if aa == val {
return true
}
}
return false
}
// TODO generic
fn (ar []int) contains(val int) bool {
for s in ar {
if s == val {
return true
}
}
return false
}
// TODO generic
pub fn (a []u64) contains(val u64) bool {
for aa in a {
if aa == val {
return true
}
}
return false
}

View File

@@ -846,16 +846,6 @@ fn (ar []string) contains(val string) bool {
return false
}
// TODO generic
fn (ar []int) contains(val int) bool {
for s in ar {
if s == val {
return true
}
}
return false
}
/*
pub fn (a []string) to_c() voidptr {
mut res := malloc(sizeof(byteptr) * a.len)