summaryrefslogtreecommitdiffstats
path: root/tests/by-util
diff options
context:
space:
mode:
authorSylvestre Ledru <sylvestre@debian.org>2024-06-30 18:55:51 +0200
committerGitHub <noreply@github.com>2024-06-30 18:55:51 +0200
commit9c0f2f84abaf21a2e62c1886b215a4034ecbcc82 (patch)
tree25101aa5e9c4619c98c6a08df31f6e68310347e1 /tests/by-util
parent3a0261c785dc370eef9a345618676be83e31beb8 (diff)
parentab679473210e329e4cf76872c73a1bcd81cdd948 (diff)
Merge pull request #6505 from Its-Just-Nans/fix-clippy-errors
Fix clippy errors
Diffstat (limited to 'tests/by-util')
-rw-r--r--tests/by-util/test_cat.rs2
-rw-r--r--tests/by-util/test_chcon.rs2
-rw-r--r--tests/by-util/test_chmod.rs26
-rw-r--r--tests/by-util/test_chown.rs3
-rw-r--r--tests/by-util/test_cp.rs22
-rw-r--r--tests/by-util/test_date.rs13
-rw-r--r--tests/by-util/test_df.rs7
-rw-r--r--tests/by-util/test_dircolors.rs8
-rw-r--r--tests/by-util/test_du.rs2
-rw-r--r--tests/by-util/test_env.rs45
-rw-r--r--tests/by-util/test_factor.rs1807
-rw-r--r--tests/by-util/test_id.rs7
-rw-r--r--tests/by-util/test_kill.rs2
-rw-r--r--tests/by-util/test_ln.rs2
-rw-r--r--tests/by-util/test_ls.rs10
-rw-r--r--tests/by-util/test_mkdir.rs2
-rw-r--r--tests/by-util/test_od.rs2
-rw-r--r--tests/by-util/test_paste.rs8
-rw-r--r--tests/by-util/test_rm.rs2
-rw-r--r--tests/by-util/test_shuf.rs16
-rw-r--r--tests/by-util/test_sort.rs1
-rw-r--r--tests/by-util/test_stat.rs4
-rw-r--r--tests/by-util/test_tail.rs37
-rw-r--r--tests/by-util/test_tee.rs2
-rw-r--r--tests/by-util/test_test.rs9
-rw-r--r--tests/by-util/test_tsort.rs2
-rw-r--r--tests/by-util/test_uniq.rs1
-rw-r--r--tests/by-util/test_uptime.rs2
-rw-r--r--tests/by-util/test_wc.rs35
29 files changed, 1223 insertions, 858 deletions
diff --git a/tests/by-util/test_cat.rs b/tests/by-util/test_cat.rs
index b11c0ec0c..d67ecb0b1 100644
--- a/tests/by-util/test_cat.rs
+++ b/tests/by-util/test_cat.rs
@@ -485,7 +485,7 @@ fn test_dev_random() {
}
/// Reading from /dev/full should return an infinite amount of zero bytes.
-/// Wikipedia says there is support on Linux, FreeBSD, and NetBSD.
+/// Wikipedia says there is support on Linux, FreeBSD, and `NetBSD`.
#[test]
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "netbsd"))]
fn test_dev_full() {
diff --git a/tests/by-util/test_chcon.rs b/tests/by-util/test_chcon.rs
index a8dae9aed..1fd356e5b 100644
--- a/tests/by-util/test_chcon.rs
+++ b/tests/by-util/test_chcon.rs
@@ -3,7 +3,7 @@
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.
// spell-checker:ignore (jargon) xattributes
-
+#![allow(clippy::missing_errors_doc, clippy::similar_names)]
#![cfg(feature = "feat_selinux")]
use std::ffi::CString;
diff --git a/tests/by-util/test_chmod.rs b/tests/by-util/test_chmod.rs
index 32bb7a966..167e79cd0 100644
--- a/tests/by-util/test_chmod.rs
+++ b/tests/by-util/test_chmod.rs
@@ -2,6 +2,7 @@
//
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.
+
use crate::common::util::{AtPath, TestScenario, UCommand};
use std::fs::{metadata, set_permissions, OpenOptions, Permissions};
use std::os::unix::fs::{OpenOptionsExt, PermissionsExt};
@@ -32,12 +33,14 @@ fn make_file(file: &str, mode: u32) {
fn run_single_test(test: &TestCase, at: &AtPath, mut ucmd: UCommand) {
make_file(&at.plus_as_string(TEST_FILE), test.before);
let perms = at.metadata(TEST_FILE).permissions().mode();
- if perms != test.before {
- panic!(
- "{}: expected: {:o} got: {:o}",
- "setting permissions on test files before actual test run failed", test.after, perms
- );
- }
+
+ assert!(
+ perms == test.before,
+ "{}: expected: {:o} got: {:o}",
+ "setting permissions on test files before actual test run failed",
+ test.after,
+ perms
+ );
for arg in &test.args {
ucmd.arg(arg);
@@ -52,9 +55,13 @@ fn run_single_test(test: &TestCase, at: &AtPath, mut ucmd: UCommand) {
}
let perms = at.metadata(TEST_FILE).permissions().mode();
- if perms != test.after {
- panic!("{}: expected: {:o} got: {:o}", ucmd, test.after, perms);
- }
+ assert!(
+ perms == test.after,
+ "{}: expected: {:o} got: {:o}",
+ ucmd,
+ test.after,
+ perms
+ );
}
fn run_tests(tests: Vec<TestCase>) {
@@ -128,6 +135,7 @@ fn test_chmod_octal() {
#[test]
#[allow(clippy::unreadable_literal)]
+#[allow(clippy::too_many_lines)]
// spell-checker:disable-next-line
fn test_chmod_ugoa() {
let tests = vec![
diff --git a/tests/by-util/test_chown.rs b/tests/by-util/test_chown.rs
index f893d2611..3fb6d69c3 100644
--- a/tests/by-util/test_chown.rs
+++ b/tests/by-util/test_chown.rs
@@ -29,9 +29,8 @@ fn skipping_test_is_okay(result: &CmdResult, needle: &str) -> bool {
if is_ci() && result.stderr_str().contains(needle) {
println!("test skipped:");
return true;
- } else {
- result.success();
}
+ result.success();
}
false
}
diff --git a/tests/by-util/test_cp.rs b/tests/by-util/test_cp.rs
index ca592f6fd..053e015f4 100644
--- a/tests/by-util/test_cp.rs
+++ b/tests/by-util/test_cp.rs
@@ -2328,9 +2328,9 @@ fn test_closes_file_descriptors() {
#[cfg(any(target_os = "linux", target_os = "android"))]
#[test]
fn test_cp_sparse_never_empty() {
+ const BUFFER_SIZE: usize = 4096 * 4;
let (at, mut ucmd) = at_and_ucmd!();
- const BUFFER_SIZE: usize = 4096 * 4;
let buf: [u8; BUFFER_SIZE] = [0; BUFFER_SIZE];
at.make_file("src_file1");
@@ -2348,10 +2348,10 @@ fn test_cp_sparse_never_empty() {
#[cfg(any(target_os = "linux", target_os = "android"))]
#[test]
fn test_cp_sparse_always_empty() {
+ const BUFFER_SIZE: usize = 4096 * 4;
for argument in ["--sparse=always", "--sparse=alway", "--sparse=al"] {
let (at, mut ucmd) = at_and_ucmd!();
- const BUFFER_SIZE: usize = 4096 * 4;
let buf: [u8; BUFFER_SIZE] = [0; BUFFER_SIZE];
at.make_file("src_file1");
@@ -2368,9 +2368,9 @@ fn test_cp_sparse_always_empty() {
#[cfg(any(target_os = "linux", target_os = "android"))]
#[test]
fn test_cp_sparse_always_non_empty() {
+ const BUFFER_SIZE: usize = 4096 * 16 + 3;
let (at, mut ucmd) = at_and_ucmd!();
- const BUFFER_SIZE: usize = 4096 * 16 + 3;
let mut buf: [u8; BUFFER_SIZE] = [0; BUFFER_SIZE];
let blocks_to_touch = [buf.len() / 3, 2 * (buf.len() / 3)];
@@ -2438,12 +2438,11 @@ fn test_cp_sparse_never_reflink_always() {
#[cfg(feature = "truncate")]
#[test]
fn test_cp_reflink_always_override() {
- let scene = TestScenario::new(util_name!());
-
const DISK: &str = "disk.img";
const ROOTDIR: &str = "disk_root/";
const USERDIR: &str = "dir/";
const MOUNTPOINT: &str = "mountpoint/";
+ let scene = TestScenario::new(util_name!());
let src1_path: &str = &[MOUNTPOINT, USERDIR, "src1"].concat();
let src2_path: &str = &[MOUNTPOINT, USERDIR, "src2"].concat();
@@ -2575,12 +2574,12 @@ fn test_no_preserve_mode() {
let umask: u16 = 0o022;
ucmd.arg("file")
.arg("dest")
- .umask(umask as libc::mode_t)
+ .umask(libc::mode_t::from(umask))
.succeeds()
.no_stderr()
.no_stdout();
// remove sticky bit, setuid and setgid bit; apply umask
- let expected_perms = PERMS_ALL & !0o7000 & !umask as u32;
+ let expected_perms = PERMS_ALL & !0o7000 & u32::from(!umask);
assert_eq!(
at.plus("dest").metadata().unwrap().mode() & 0o7777,
expected_perms
@@ -5507,16 +5506,17 @@ fn test_dir_perm_race_with_preserve_mode_and_ownership() {
let start_time = std::time::Instant::now();
// wait for cp to create dirs
loop {
- if start_time.elapsed() >= timeout {
- panic!("timed out: cp took too long to create destination directory")
- }
+ assert!(
+ start_time.elapsed() < timeout,
+ "timed out: cp took too long to create destination directory"
+ );
if at.dir_exists(&format!("{}/{}", DEST_DIR, SRC_DIR)) {
break;
}
std::thread::sleep(Duration::from_millis(100));
}
let mode = at.metadata(&format!("{}/{}", DEST_DIR, SRC_DIR)).mode();
- #[allow(clippy::unnecessary_cast)]
+ #[allow(clippy::unnecessary_cast, clippy::cast_lossless)]
let mask = if attr == "mode" {
libc::S_IWGRP | libc::S_IWOTH
} else {
diff --git a/tests/by-util/test_date.rs b/tests/by-util/test_date.rs
index 13c340b07..aea8989b6 100644
--- a/tests/by-util/test_date.rs
+++ b/tests/by-util/test_date.rs
@@ -273,7 +273,7 @@ fn test_date_set_mac_unavailable() {
#[test]
#[cfg(all(unix, not(target_os = "macos")))]
-/// TODO: expected to fail currently; change to succeeds() when required.
+/// TODO: expected to fail currently; change to `succeeds()` when required.
fn test_date_set_valid_2() {
if geteuid() == 0 {
let result = new_ucmd!()
@@ -298,10 +298,11 @@ fn test_date_for_invalid_file() {
#[test]
#[cfg(unix)]
fn test_date_for_no_permission_file() {
- let (at, mut ucmd) = at_and_ucmd!();
+ use std::os::unix::fs::PermissionsExt;
const FILE: &str = "file-no-perm-1";
- use std::os::unix::fs::PermissionsExt;
+ let (at, mut ucmd) = at_and_ucmd!();
+
let file = std::fs::OpenOptions::new()
.create(true)
.truncate(true)
@@ -338,7 +339,7 @@ fn test_date_for_file() {
#[test]
#[cfg(all(unix, not(target_os = "macos")))]
-/// TODO: expected to fail currently; change to succeeds() when required.
+/// TODO: expected to fail currently; change to `succeeds()` when required.
fn test_date_set_valid_3() {
if geteuid() == 0 {
let result = new_ucmd!()
@@ -352,7 +353,7 @@ fn test_date_set_valid_3() {
#[test]
#[cfg(all(unix, not(target_os = "macos")))]
-/// TODO: expected to fail currently; change to succeeds() when required.
+/// TODO: expected to fail currently; change to `succeeds()` when required.
fn test_date_set_valid_4() {
if geteuid() == 0 {
let result = new_ucmd!()
@@ -422,8 +423,8 @@ fn test_date_overflow() {
#[test]
fn test_date_parse_from_format() {
- let (at, mut ucmd) = at_and_ucmd!();
const FILE: &str = "file-with-dates";
+ let (at, mut ucmd) = at_and_ucmd!();
at.write(
FILE,
diff --git a/tests/by-util/test_df.rs b/tests/by-util/test_df.rs
index 996b8dc29..c67af5cba 100644
--- a/tests/by-util/test_df.rs
+++ b/tests/by-util/test_df.rs
@@ -3,6 +3,13 @@
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.
// spell-checker:ignore udev pcent iuse itotal iused ipcent
+#![allow(
+ clippy::similar_names,
+ clippy::cast_possible_truncation,
+ clippy::cast_sign_loss,
+ clippy::float_cmp
+)]
+
use std::collections::HashSet;
use crate::common::util::TestScenario;
diff --git a/tests/by-util/test_dircolors.rs b/tests/by-util/test_dircolors.rs
index d67368154..06d490c4a 100644
--- a/tests/by-util/test_dircolors.rs
+++ b/tests/by-util/test_dircolors.rs
@@ -200,15 +200,15 @@ TERM {term_pattern}
.no_stderr();
}
- let expectation_if_match = r#"
+ let expectation_if_match = r"
LS_COLORS='*.term_matching=00;38;5;61:';
export LS_COLORS
-"#
+"
.trim_start();
- let expectation_if_no_match = r#"
+ let expectation_if_no_match = r"
LS_COLORS='';
export LS_COLORS
-"#
+"
.trim_start();
// sanity checks
diff --git a/tests/by-util/test_du.rs b/tests/by-util/test_du.rs
index 4527b3d5a..c1cd356a1 100644
--- a/tests/by-util/test_du.rs
+++ b/tests/by-util/test_du.rs
@@ -545,7 +545,7 @@ fn test_du_h_flag_empty_file() {
#[test]
fn test_du_h_precision() {
let test_cases = [
- (133456345, "128M"),
+ (133_456_345, "128M"),
(12 * 1024 * 1024, "12M"),
(8500, "8.4K"),
];
diff --git a/tests/by-util/test_env.rs b/tests/by-util/test_env.rs
index f8c5c66d1..0a509c5d7 100644
--- a/tests/by-util/test_env.rs
+++ b/tests/by-util/test_env.rs
@@ -3,6 +3,7 @@
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.
// spell-checker:ignore (words) bamf chdir rlimit prlimit COMSPEC cout cerr FFFD
+#![allow(clippy::missing_errors_doc)]
use crate::common::util::TestScenario;
#[cfg(unix)]
@@ -555,28 +556,28 @@ fn test_env_parsing_errors() {
.stderr_is("env: invalid sequence '\\a' in -S\n");
ts.ucmd()
- .arg(r#"-S\|\&\;"#) // no quotes, invalid escape sequence |
+ .arg(r"-S\|\&\;") // no quotes, invalid escape sequence |
.fails()
.code_is(125)
.no_stdout()
.stderr_is("env: invalid sequence '\\|' in -S\n");
ts.ucmd()
- .arg(r#"-S\<\&\;"#) // no quotes, invalid escape sequence <
+ .arg(r"-S\<\&\;") // no quotes, invalid escape sequence <
.fails()
.code_is(125)
.no_stdout()
.stderr_is("env: invalid sequence '\\<' in -S\n");
ts.ucmd()
- .arg(r#"-S\>\&\;"#) // no quotes, invalid escape sequence >
+ .arg(r"-S\>\&\;") // no quotes, invalid escape sequence >
.fails()
.code_is(125)
.no_stdout()
.stderr_is("env: invalid sequence '\\>' in -S\n");
ts.ucmd()
- .arg(r#"-S\`\&\;"#) // no quotes, invalid escape sequence `
+ .arg(r"-S\`\&\;") // no quotes, invalid escape sequence `
.fails()
.code_is(125)
.no_stdout()
@@ -590,14 +591,14 @@ fn test_env_parsing_errors() {
.stderr_is("env: invalid sequence '\\`' in -S\n");
ts.ucmd()
- .arg(r#"-S'\`\&\;'"#) // single quotes, invalid escape sequence `
+ .arg(r"-S'\`\&\;'") // single quotes, invalid escape sequence `
.fails()
.code_is(125)
.no_stdout()
.stderr_is("env: invalid sequence '\\`' in -S\n");
ts.ucmd()
- .arg(r#"-S\`"#) // ` escaped without quotes
+ .arg(r"-S\`") // ` escaped without quotes
.fails()
.code_is(125)
.no_stdout()
@@ -611,14 +612,14 @@ fn test_env_parsing_errors() {
.stderr_is("env: invalid sequence '\\`' in -S\n");
ts.ucmd()
- .arg(r#"-S'\`'"#) // ` escaped in single quotes
+ .arg(r"-S'\`'") // ` escaped in single quotes
.fails()
.code_is(125)
.no_stdout()
.stderr_is("env: invalid sequence '\\`' in -S\n");
ts.ucmd()
- .args(&[r#"-S\🦉"#]) // ` escaped in single quotes
+ .args(&[r"-S\🦉"]) // ` escaped in single quotes
.fails()
.code_is(125)
.no_stdout()
@@ -1068,11 +1069,11 @@ mod tests_split_iterator {
#[test]
fn split_single_quotes() {
split_ok(&[
- (r#"''"#, &[r#""#]),
- (r#"'a'"#, &[r#"a"#]),
- (r#"'\\'"#, &[r#"\"#]),
- (r#"' \\ '"#, &[r#" \ "#]),
- (r#"'#'"#, &[r#"#"#]),
+ (r"''", &[r""]),
+ (r"'a'", &[r"a"]),
+ (r"'\\'", &[r"\"]),
+ (r"' \\ '", &[r" \ "]),
+ (r"'#'", &[r"#"]),
]);
}
@@ -1094,12 +1095,12 @@ mod tests_split_iterator {
#[test]
fn split_unquoted() {
split_ok(&[
- (r#"\\|\\&\\;"#, &[r#"\|\&\;"#]),
- (r#"\\<\\>"#, &[r#"\<\>"#]),
- (r#"\\(\\)"#, &[r#"\(\)"#]),
- (r#"\$"#, &[r#"$"#]),
+ (r"\\|\\&\\;", &[r"\|\&\;"]),
+ (r"\\<\\>", &[r"\<\>"]),
+ (r"\\(\\)", &[r"\(\)"]),
+ (r"\$", &[r"$"]),
(r#"\""#, &[r#"""#]),
- (r#"\'"#, &[r#"'"#]),
+ (r"\'", &[r"'"]),
("\\\n", &[]),
(" \\\n \n", &[]),
("a\nb\nc", &["a", "b", "c"]),
@@ -1179,7 +1180,7 @@ mod tests_split_iterator {
Err(ParseError::InvalidSequenceBackslashXInMinusS { pos: 2, c: 'a' })
);
assert_eq!(
- split(r#"\🦉"#),
+ split(r"\🦉"),
Err(ParseError::InvalidSequenceBackslashXInMinusS {
pos: 1,
c: '\u{FFFD}'
@@ -1190,9 +1191,9 @@ mod tests_split_iterator {
#[test]
fn split_comments() {
split_ok(&[
- (r#" x # comment "#, &["x"]),
- (r#" w1#w2 "#, &["w1#w2"]),
- (r#"'not really a # comment'"#, &["not really a # comment"]),
+ (r" x # comment ", &["x"]),
+ (r" w1#w2 ", &["w1#w2"]),
+ (r"'not really a # comment'", &["not really a # comment"]),
(" a # very long comment \n b # another comment", &["a", "b"]),
]);
}
diff --git a/tests/by-util/test_factor.rs b/tests/by-util/test_factor.rs
index f643a4049..36c2ccab8 100644
--- a/tests/by-util/test_factor.rs
+++ b/tests/by-util/test_factor.rs
@@ -4,6 +4,11 @@
// file that was distributed with this source code.
// spell-checker:ignore (methods) hexdigest funcs nprimes
+#![allow(
+ clippy::similar_names,
+ clippy::cast_possible_truncation,
+ clippy::cast_sign_loss
+)]
use crate::common::util::TestScenario;
@@ -379,55 +384,55 @@ const PRIMES_BY_BITS: &[&[u64]] = &[
];
const PRIMES64: &[u64] = &[
- 18446744073709551557,
- 18446744073709551533,
- 18446744073709551521,
- 18446744073709551437,
- 18446744073709551427,
- 18446744073709551359,
- 18446744073709551337,
- 18446744073709551293,
- 18446744073709551263,
- 18446744073709551253,
- 18446744073709551191,
- 18446744073709551163,
- 18446744073709551113,
- 18446744073709550873,
- 18446744073709550791,
- 18446744073709550773,
- 18446744073709550771,
- 18446744073709550719,
- 18446744073709550717,
- 18446744073709550681,
- 18446744073709550671,
- 18446744073709550593,
- 18446744073709550591,
- 18446744073709550539,
- 18446744073709550537,
- 18446744073709550381,
- 18446744073709550341,
- 18446744073709550293,
- 18446744073709550237,
- 18446744073709550147,
- 18446744073709550141,
- 18446744073709550129,
- 18446744073709550111,
- 18446744073709550099,
- 18446744073709550047,
- 18446744073709550033,
- 18446744073709550009,
- 18446744073709549951,
- 18446744073709549861,
- 18446744073709549817,
- 18446744073709549811,
- 18446744073709549777,
- 18446744073709549757,
- 18446744073709549733,
- 18446744073709549667,
- 18446744073709549621,
- 18446744073709549613,
- 18446744073709549583,
- 18446744073709549571,
+ 18_446_744_073_709_551_557,
+ 18_446_744_073_709_551_533,
+ 18_446_744_073_709_551_521,
+ 18_446_744_073_709_551_437,
+ 18_446_744_073_709_551_427,
+ 18_446_744_073_709_551_359,
+ 18_446_744_073_709_551_337,
+ 18_446_744_073_709_551_293,
+ 18_446_744_073_709_551_263,
+ 18_446_744_073_709_551_253,
+ 18_446_744_073_709_551_191,
+ 18_446_744_073_709_551_163,
+ 18_446_744_073_709_551_113,
+ 18_446_744_073_709_550_873,
+ 18_446_744_073_709_550_791,
+ 18_446_744_073_709_550_773,
+ 18_446_744_073_709_550_771,
+ 18_446_744_073_709_550_719,
+ 18_446_744_073_709_550_717,
+ 18_446_744_073_709_550_681,
+ 18_446_744_073_709_550_671,
+ 18_446_744_073_709_550_593,
+ 18_446_744_073_709_550_591,
+ 18_446_744_073_709_550_539,
+ 18_446_744_073_709_550_537,
+ 18_446_744_073_709_550_381,
+ 18_446_744_073_709_550_341,
+ 18_446_744_073_709_550_293,
+ 18_446_744_073_709_550_237,
+ 18_446_744_073_709_550_147,
+ 18_446_744_073_709_550_141,
+ 18_446_744_073_709_550_129,
+ 18_446_744_073_709_550_111,
+ 18_446_744_073_709_550_099,
+ 18_446_744_073_709_550_047,
+ 18_446_744_073_709_550_033,
+ 18_446_744_073_709_550_009,
+ 18_446_744_073_709_549_951,
+ 18_446_744_073_709_549_861,
+ 18_446_744_073_709_549_817,
+ 18_446_744_073_709_549_811,
+ 18_446_744_073_709_549_777,
+ 18_446_744_073_709_549_757,
+ 18_446_744_073_709_549_733,
+ 18_446_744_073_709_549_667,
+ 18_446_744_073_709_549_621,
+ 18_446_744_073_709_549_613,
+ 18_446_744_073_709_549_583,
+ 18_446_744_073_709_549_571,
];
const PRIMES14: &[u64] = &[
@@ -464,801 +469,1113 @@ const PRIMES16: &[u64] = &[
];
const PRIMES17: &[u64] = &[
- 131071, 131063, 131059, 131041, 131023, 131011, 131009, 130987, 130981, 130973, 130969, 130957,
- 130927, 130873, 130859, 130843, 130841, 130829, 130817, 130811, 130807, 130787, 130783, 130769,
- 130729, 130699, 130693, 130687, 130681, 130657, 130651, 130649, 130643, 130639, 130633, 130631,
- 130621, 130619, 130589, 130579, 130553, 130547, 130531, 130523, 130517, 130513, 130489, 130483,
- 130477, 130469, 130457, 130447, 130439, 130423, 130411, 130409, 130399, 130379, 130369, 130367,
- 130363, 130349, 130343, 130337, 130307, 130303, 130279, 130267, 130261, 130259, 130253, 130241,
- 130223, 130211, 130201, 130199, 130183, 130171, 130147, 130127, 130121, 130099, 130087, 130079,
- 130073, 130069, 130057, 130051,
+ 131_071, 131_063, 131_059, 131_041, 131_023, 131_011, 131_009, 130_987, 130_981, 130_973,
+ 130_969, 130_957, 130_927, 130_873, 130_859, 130_843, 130_841, 130_829, 130_817, 130_811,
+ 130_807, 130_787, 130_783, 130_769, 130_729, 130_699, 130_693, 130_687, 130_681, 130_657,
+ 130_651, 130_649, 130_643, 130_639, 130_633, 130_631, 130_621, 130_619, 130_589, 130_579,
+ 130_553, 130_547, 130_531, 130_523, 130_517, 130_513, 130_489, 130_483, 130_477, 130_469,
+ 130_457, 130_447, 130_439, 130_423, 130_411, 130_409, 130_399, 130_379, 130_369, 130_367,
+ 130_363, 130_349, 130_343, 130_337, 130_307, 130_303, 130_279, 130_267, 130_261, 130_259,
+ 130_253, 130_241, 130_223, 130_211, 130_201, 130_199, 130_183, 130_171, 130_147, 130_127,
+ 130_121, 130_099, 130_087, 130_079, 130_073, 130_069, 130_057, 130_051,
];
const PRIMES18: &[u64] = &[
- 262139, 262133, 262127, 262121, 262111, 262109, 262103, 262079, 262069, 262051, 262049, 262027,
- 262007, 261983, 261977, 261973, 261971, 261959, 261917, 261887, 261881, 261847, 261823, 261799,
- 261791, 261787, 261773, 261761, 261757, 261739, 261721, 261713, 261707, 261697, 261673, 261643,
- 261641, 261637, 261631, 261619, 261601, 261593, 261587, 261581, 261577, 261563, 261557, 261529,
- 261523, 261509, 261467, 261463, 261451, 261439, 261433, 261431, 261427, 261407, 261389, 261379,
- 261353, 261347, 261337, 261329, 261323, 261301, 261281, 261271, 261251, 261241, 261229, 261223,
- 261169, 261167, 261127,
+ 262_139, 262_133, 262_127, 262_121, 262_111, 262_109, 262_103, 262_079, 262_069, 262_051,
+ 262_049, 262_027, 262_007, 261_983, 261_977, 261_973, 261_971, 261_959, 261_917, 261_887,
+ 261_881, 261_847, 261_823, 261_799, 261_791, 261_787, 261_773, 261_761, 261_757, 261_739,
+ 261_721, 261_713, 261_707, 261_697, 261_673, 261_643, 261_641, 261_637, 261_631, 261_619,
+ 261_601, 261_593, 261_587, 261_581, 261_577, 261_563, 261_557, 261_529, 261_523, 261_509,
+ 261_467, 261_463, 261_451, 261_439, 261_433, 261_431, 261_427, 261_407, 261_389, 261_379,
+ 261_353, 261_347, 261_337, 261_329, 261_323, 261_301, 261_281, 261_271, 261_251, 261_241,
+ 261_229, 261_223, 261_169, 261_167, 261_127,
];
const PRIMES19: &[u64] = &[
- 524287, 524269, 524261, 524257, 524243, 524231, 524221, 524219, 524203, 524201, 524197, 524189,
- 524171, 524149, 524123, 524119, 524113, 524099, 524087, 524081, 524071, 524063, 524057, 524053,
- 524047, 523997, 523987, 523969, 523949, 523937, 523927, 523907, 523903, 523877, 523867, 523847,
- 523829, 523801, 523793, 523777, 523771, 523763, 523759, 523741, 523729, 523717, 523681, 523673,
- 523669, 523667, 523657, 523639, 523637, 523631, 523603, 523597, 523577, 523573, 523571, 523553,
- 523543, 523541, 523519, 523511, 523493, 523489, 523487, 523463, 523459, 523433, 523427, 523417,
- 523403, 523387, 523357, 523351, 523349, 523333, 523307, 523297,
+ 524_287, 524_269, 524_261, 524_257, 524_243, 524_231, 524_221, 524_219, 524_203, 524_201,
+ 524_197, 524_189, 524_171, 524_149, 524_123, 524_119, 524_113, 524_099, 524_087, 524_081,
+ 524_071, 524_063, 524_057, 524_053, 524_047, 523_997, 523_987, 523_969, 523_949, 523_937,
+ 523_927, 523_907, 523_903, 523_877, 523_867, 523_847, 523_829, 523_801, 523_793, 523_777,
+ 523_771, 523_763, 523_759, 523_741, 523_729, 523_717, 523_681, 523_673, 523_669, 523_667,
+ 523_657, 523_639, 523_637, 523_631, 523_603, 523_597, 523_577, 523_573, 523_571, 523_553,
+ 523_543, 523_541, 523_519, 523_511, 523_493, 523_489, 523_487, 523_463, 523_459, 523_433,
+ 523_427, 523_417, 523_403, 523_387, 523_357, 523_351, 523_349, 523_333, 523_307, 523_297,
];
const PRIMES20: &[u64] = &[
- 1048573, 1048571, 1048559, 1048549, 1048517, 1048507, 1048447, 1048433, 1048423, 1048391,
- 1048387, 1048367, 1048361, 1048357, 1048343, 1048309, 1048291, 1048273, 1048261, 1048219,
- 1048217, 1048213, 1048193, 1048189, 1048139, 1048129, 1048127, 1048123, 1048063, 1048051,
- 1048049, 1048043, 1048027, 1048013, 1048009, 1048007, 1047997, 1047989, 1047979, 1047971,
- 1047961, 1047941, 1047929, 1047923, 1047887, 1047883, 1047881, 1047859, 1047841, 1047833,
- 1047821, 1047779, 1047773, 1047763, 1047751, 1047737, 1047721, 1047713, 1047703, 1047701,
- 1047691, 1047689, 1047671, 1047667, 1047653, 1047649, 1047647, 1047589, 1047587, 1047559,
+ 1_048_573, 1_048_571, 1_048_559, 1_048_549, 1_048_517, 1_048_507, 1_048_447, 1_048_433,
+ 1_048_423, 1_048_391, 1_048_387, 1_048_367, 1_048_361, 1_048_357, 1_048_343, 1_048_309,
+ 1_048_291, 1_048_273, 1_048_261, 1_048_219, 1_048_217, 1_048_213, 1_048_193, 1_048_189,
+ 1_048_139, 1_048_129, 1_048_127, 1_048_123, 1_048_063, 1_048_051, 1_048_049, 1_048_043,
+ 1_048_027, 1_048_013, 1_048_009, 1_048_007, 1_047_997, 1_047_989, 1_047_979, 1_047_971,
+ 1_047_961, 1_047_941, 1_047_929, 1_047_923, 1_047_887, 1_047_883, 1_047_881, 1_047_859,
+ 1_047_841, 1_047_833, 1_047_821, 1_047_779, 1_047_773, 1_047_763, 1_047_751, 1_047_737,
+ 1_047_721, 1_047_713, 1_047_703, 1_047_701, 1_047_691, 1_047_689, 1_047_671, 1_047_667,
+ 1_047_653, 1_047_649, 1_047_647, 1_047_589, 1_047_587, 1_047_559,
];
const PRIMES21: &[u64] = &[
- 2097143, 2097133, 2097131, 2097097, 2097091, 2097083, 2097047, 2097041, 2097031, 2097023,
- 2097013, 2096993, 2096987, 2096971, 2096959, 2096957, 2096947, 2096923, 2096911, 2096909,
- 2096893, 2096881, 2096873, 2096867, 2096851, 2096837, 2096807, 2096791, 2096789, 2096777,
- 2096761, 2096741, 2096737, 2096713, 2096693, 2096687, 2096681, 2096639, 2096629, 2096621,
- 2096599, 2096597, 2096569, 2096539, 2096533, 2096483, 2096449, 2096431, 2096429, 2096411,
- 2096407, 2096401, 2096399, 2096377, 2096357, 2096291, 2096273, 2096261, 2096233, 2096231,
- 2096221, 2096209, 2096191, 2096183, 2096147,
+ 2_097_143, 2_097_133, 2_097_131, 2_097_097, 2_097_091, 2_097_083, 2_097_047, 2_097_041,
+ 2_097_031, 2_097_023, 2_097_013, 2_096_993, 2_096_987, 2_096_971, 2_096_959, 2_096_957,
+ 2_096_947, 2_096_923, 2_096_911, 2_096_909, 2_096_893, 2_096_881, 2_096_873, 2_096_867,
+ 2_096_851, 2_096_837, 2_096_807, 2_096_791, 2_096_789, 2_096_777, 2_096_761, 2_096_741,
+ 2_096_737, 2_096_713, 2_096_693, 2_096_687, 2_096_681, 2_096_639, 2_096_629, 2_096_621,
+ 2_096_599, 2_096_597, 2_096_569, 2_096_539, 2_096_533, 2_096_483, 2_096_449, 2_096_431,
+ 2_096_429, 2_096_411, 2_096_407, 2_096_401, 2_096_399, 2_096_377, 2_096_357, 2_096_291,
+ 2_096_273, 2_096_261, 2_096_233, 2_096_231, 2_096_221, 2_096_209, 2_096_191, 2_096_183,
+ 2_096_147,
];
const PRIMES22: &[u64] = &[
- 4194301, 4194287, 4194277, 4194271, 4194247, 4194217, 4194199, 4194191, 4194187, 4194181,
- 4194173, 4194167, 4194143, 4194137, 4194131, 4194107, 4194103, 4194023, 4194011, 4194007,
- 4193977, 4193971, 4193963, 4193957, 4193939, 4193929, 4193909, 4193869, 4193807, 4193803,
- 4193801, 4193789, 4193759, 4193753, 4193743, 4193701, 4193663, 4193633, 4193573, 4193569,
- 4193551, 4193549, 4193531, 4193513, 4193507, 4193459, 4193447, 4193443, 4193417, 4193411,
- 4193393, 4193389, 4193381, 4193377, 4193369, 4193359, 4193353, 4193327, 4193309, 4193303,
- 4193297,
+ 4_194_301, 4_194_287, 4_194_277, 4_194_271, 4_194_247, 4_194_217, 4_194_199, 4_194_191,
+ 4_194_187, 4_194_181, 4_194_173, 4_194_167, 4_194_143, 4_194_137, 4_194_131, 4_194_107,
+ 4_194_103, 4_194_023, 4_194_011, 4_194_007, 4_193_977, 4_193_971, 4_193_963, 4_193_957,
+ 4_193_939, 4_193_929, 4_193_909, 4_193_869, 4_193_807, 4_193_803, 4_193_801, 4_193_789,
+ 4_193_759, 4_193_753, 4_193_743, 4_193_701, 4_193_663, 4_193_633, 4_193_573, 4_193_569,
+ 4_193_551, 4_193_549, 4_193_531, 4_193_513, 4_193_507, 4_193_459, 4_193_447, 4_193_443,
+ 4_193_417, 4_193_411, 4_193_393, 4_193_389, 4_193_381, 4_193_377, 4_193_369, 4_193_359,
+ 4_193_353, 4_193_327, 4_193_309, 4_193_303, 4_193_297,
];
const PRIMES23: &[u64] = &[
- 8388593, 8388587, 8388581, 8388571, 8388547, 8388539, 8388473, 8388461, 8388451, 8388449,
- 8388439, 8388427, 8388421, 8388409, 8388377, 8388371, 8388319, 8388301, 8388287, 8388283,
- 8388277, 8388239, 8388209, 8388187, 8388113, 8388109, 8388091, 8388071, 8388059, 8388019,
- 8388013, 8387999, 8387993, 8387959, 8387957, 8387947, 8387933, 8387921, 8387917, 8387891,
- 8387879, 8387867, 8387861, 8387857, 8387839, 8387831, 8387809, 8387807, 8387741, 8387737,