text stringlengths 93 16.4k | id stringlengths 20 40 | metadata dict | input_ids listlengths 45 2.05k | attention_mask listlengths 45 2.05k | complexity int64 1 9 |
|---|---|---|---|---|---|
#[test]
fn test_pathbuf_string_conversion() {
let input_path_string = "/home/test/.kube/config";
let legal_path = PathBuf::from(input_path_string);
let legal_path_string = CreatingConfig::pathbuf_to_string("testfield", legal_path).unwrap();
assert_eq!(input_path_string, legal_pat... | rust_cleaned_test_functions.jsonl/32150 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 138
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2638,
5909,
3904,
64132,
368,
341,
286,
1077,
1946,
2638,
3904,
284,
3521,
5117,
12697,
11930,
97717,
14730,
876,
286,
1077,
5777,
2638,
284,
7933,
15064,
486,
1499,
5384,
2638,
3904,
317,
286,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_solve() {
let input = vec![1721, 979, 366, 299, 675, 1456];
assert_eq!(solve(&input), Some(241861950));
} | rust_cleaned_test_functions.jsonl/108750 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 62
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86246,
368,
341,
10217,
1946,
284,
7486,
20703,
16,
22,
17,
16,
11,
220,
24,
22,
24,
11,
220,
18,
21,
21,
11,
220,
17,
24,
24,
11,
220,
21,
22,
20,
11,
220,
16,
19,
20,
21,
935,
6948,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_fail_thematic_break_into_paragraph() {
assert_eq!(
parse("# boop\n\n-d--\n\n## boop 2\n\n",).unwrap(),
Mdx {
ast: vec![
MdxAst::ATXHeading(ast::ATXHeading {
level: 1,
value: "boop"
}),
... | rust_cleaned_test_functions.jsonl/58230 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 367
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
22121,
5854,
12240,
39494,
45514,
96713,
368,
341,
262,
2060,
10714,
33673,
286,
4715,
3584,
708,
453,
1699,
1699,
1737,
313,
59,
77,
1699,
565,
708,
453,
220,
17,
1699,
1699,
497,
568,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_add_iface() {
let mut exec = fasync::TestExecutor::new().expect("Failed to create an executor");
// Boilerplate for adding a new interface.
let iface_map = Arc::new(IfaceMap::new());
let iface_counter = Arc::new(IfaceCounter::new());
let (inspect_tree, _p... | rust_cleaned_test_functions.jsonl/46968 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
67666,
368,
341,
286,
1077,
5206,
3883,
284,
282,
7692,
486,
2271,
25255,
486,
931,
1005,
17119,
445,
9408,
311,
1855,
458,
31558,
3071,
286,
442,
45665,
1750,
369,
7842,
264,
501,
3749,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_symlink_type_dir() {
let tmp_dir = tempdir().expect("failed to create temp dir");
// Create directory
let dir_path = tmp_dir.path().join("dir.d");
std::fs::create_dir(&dir_path).expect("failed to create dir");
// Create symlink
let symlink_path =... | rust_cleaned_test_functions.jsonl/60421 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 375
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58530,
44243,
1819,
4334,
368,
341,
286,
1077,
4174,
4334,
284,
2730,
3741,
1005,
17119,
445,
16091,
311,
1855,
2730,
5419,
3071,
286,
442,
4230,
6220,
198,
286,
1077,
5419,
2638,
284,
4174,
4334,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_op_gte() {
let mut c = Compiler::new();
c.add(Instruction::LoadConst(Value::from(1)));
c.add(Instruction::LoadConst(Value::from(2)));
c.add(Instruction::Gte);
c.add(Instruction::Emit);
let mut output = String::new();
simple_eval(&c.finish().0, (), &mut output).unwrap... | rust_cleaned_test_functions.jsonl/72131 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 286
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10287,
1889,
665,
368,
341,
262,
1077,
5206,
272,
284,
45631,
486,
931,
543,
262,
272,
1364,
7,
16664,
486,
5879,
19167,
25346,
486,
1499,
7,
16,
4945,
262,
272,
1364,
7,
16664,
486,
5879,
191... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_en_passant() {
let movegen = MoveGenerator::new();
let mut builder = PositionBuilder::new();
builder
.place(Square::C4, Piece::BlackPawn, Color::Black)
.place(Square::B4, Piece::WhitePawn, Color::White)
.place(Square::G5, Piece::WhitePawn, Color::White)
... | rust_cleaned_test_functions.jsonl/134622 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 483
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
6205,
15464,
517,
368,
341,
262,
1077,
3271,
4370,
284,
14561,
12561,
486,
931,
543,
262,
1077,
5206,
7363,
284,
12380,
3297,
486,
931,
543,
262,
7363,
198,
414,
659,
2007,
3759,
5151,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fn_signature_two_args_empty() {
let info = call_info(
r#"fn foo(x: u32, y: u32) -> u32 {x + y}
fn bar() { foo(<|>); }"#,
);
assert_eq!(info.parameters(), ["x: u32", "y: u32"]);
assert_eq!(info.active_parameter, Some(0));
} | rust_cleaned_test_functions.jsonl/55348 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 161
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15246,
39859,
23241,
8384,
15124,
368,
341,
286,
1077,
3546,
284,
1618,
3109,
1006,
310,
435,
55543,
8822,
15229,
2075,
25,
575,
18,
17,
11,
379,
25,
575,
18,
17,
8,
1464,
575,
18,
17,
314,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_try_split() {
let mut a: Vec<Element> = [
(0u32, 4u32),
(7, 4),
(4, 3),
(7, 4),
(8, 4),
(0, 4),
(13, 4),
(1, 2),
(1, 2),
]
.iter()
.map(|(value, depth)| Ele... | rust_cleaned_test_functions.jsonl/124064 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 373
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
17052,
368,
341,
286,
1077,
5206,
264,
25,
11312,
72365,
29,
284,
2278,
310,
320,
15,
84,
18,
17,
11,
220,
19,
84,
18,
17,
1326,
310,
320,
22,
11,
220,
19,
1326,
310,
320,
19,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_zip321_parse_empty_message() {
let fragment = "message=";
let result = zcashparam(&TEST_NETWORK)(fragment).unwrap().1.param;
assert_eq!(result, Param::Message("".to_string()));
} | rust_cleaned_test_functions.jsonl/81781 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 101
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42131,
18,
17,
16,
21039,
15124,
6462,
368,
341,
286,
1077,
12289,
284,
330,
1994,
428,
401,
286,
1077,
1102,
284,
1147,
41271,
903,
2099,
10033,
48119,
2376,
42202,
568,
15454,
1005,
16,
6634,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_session_description_json() {
let tests = vec![
(
RTCSessionDescription {
sdp_type: RTCSdpType::Offer,
sdp: "sdp".to_owned(),
parsed: None,
},
r#"{"type":"offer","sdp":"... | rust_cleaned_test_functions.jsonl/124416 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1271
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12316,
11448,
9455,
368,
341,
286,
1077,
7032,
284,
7486,
90515,
310,
2399,
394,
35047,
5283,
5009,
341,
503,
274,
9796,
1819,
25,
10635,
6412,
9796,
929,
486,
39462,
345,
503,
274,
9796,
25,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_move_to_winapi() {
let (saved_x, saved_y) = position().unwrap();
move_to(saved_x + 1, saved_y + 1).unwrap();
assert_eq!(position().unwrap(), (saved_x + 1, saved_y + 1));
move_to(saved_x, saved_y).unwrap();
assert_eq!(position().unwrap(), (saved_x, saved_... | rust_cleaned_test_functions.jsonl/15637 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 164
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17134,
2346,
25672,
2068,
368,
341,
286,
1077,
320,
32702,
3212,
11,
6781,
4178,
8,
284,
2309,
1005,
15454,
1428,
286,
3271,
2346,
14217,
3212,
488,
220,
16,
11,
6781,
4178,
488,
220,
16,
568,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_start_training_selected_participant_training_complete() {
let mut protocol = Protocol::new(get_default_fl_settings());
protocol.is_training_complete = true;
let resp = protocol.start_training(ClientState::Selected);
assert_eq!(StartTrainingResponse::Reject, resp... | rust_cleaned_test_functions.jsonl/97781 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 142
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4906,
32891,
23755,
10495,
21757,
32891,
27675,
368,
341,
286,
1077,
5206,
11507,
284,
24572,
486,
931,
5433,
9993,
5081,
10853,
1423,
286,
11507,
2079,
32891,
27675,
284,
830,
401,
286,
1077,
9039,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_folder_dup() {
let items = string_vec_to_status(&[
"a/file.txt",
"a/file2.txt",
]);
let res = FileTreeItems::new(&items, &BTreeSet::new())
.unwrap()
.items
.iter()
.map(|i| i.info.full_path.clone(... | rust_cleaned_test_functions.jsonl/56874 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 352
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15268,
51932,
368,
341,
286,
1077,
3589,
284,
914,
13251,
2346,
4773,
2099,
9640,
310,
330,
64,
23903,
3909,
497,
2303,
310,
330,
64,
23903,
17,
3909,
497,
715,
286,
22712,
286,
1077,
592,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_binary_representation_rfc_private_key() {
let parameters = [
HssParameter::construct_default_parameters(),
HssParameter::construct_default_parameters(),
];
let mut seed = Seed::default();
OsRng.fill_bytes(&mut seed);
let key = Refe... | rust_cleaned_test_functions.jsonl/29975 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 274
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31761,
94263,
1710,
8316,
26249,
3097,
368,
341,
286,
1077,
5029,
284,
2278,
310,
472,
778,
4971,
486,
7596,
9993,
18263,
3148,
310,
472,
778,
4971,
486,
7596,
9993,
18263,
3148,
286,
15424,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ElfMut_from_dynamic_hdr() {
let mut buf = ELF32_DYNAMIC_ELF_HDR.clone();
let elf: Result<ElfMut<'_, LittleEndian, Elf32>, ElfError> =
ElfMut::try_from(&mut buf[0..]);
assert!(elf.is_ok());
} | rust_cleaned_test_functions.jsonl/119500 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2089,
11008,
51440,
5673,
45992,
28238,
368,
341,
262,
1077,
5206,
6607,
284,
72568,
18,
17,
57356,
2089,
22609,
55765,
15997,
543,
262,
1077,
40745,
25,
5714,
27,
75832,
51440,
18291,
6878,
14671,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_check_resource_blocks_missing_has_permission_warning() {
let mut kb = KnowledgeBase::new();
kb.resource_blocks
.resources
.insert(term!(sym!("Organization")));
assert!(check_resource_blocks_missing_has_permission(&kb).is_some());
} | rust_cleaned_test_functions.jsonl/102136 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 134
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
17962,
25201,
40447,
21778,
37971,
38395,
368,
341,
286,
1077,
5206,
38653,
284,
31925,
3978,
486,
931,
543,
286,
38653,
24013,
25201,
198,
310,
659,
12745,
198,
310,
659,
4208,
44654,
10297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_merge_normal_to_sparse() {
let mut hll: HyperLogLogPlus<u64, PassThroughHasherBuilder> =
HyperLogLogPlus::new(16, PassThroughHasherBuilder {}).unwrap();
let mut other: HyperLogLogPlus<u64, PassThroughHasherBuilder> =
HyperLogLogPlus::new(16, PassThroughHas... | rust_cleaned_test_functions.jsonl/8355 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 404
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
13973,
2346,
71123,
368,
341,
286,
1077,
5206,
305,
654,
25,
32732,
2201,
2201,
21807,
34837,
21,
19,
11,
9970,
23857,
6370,
261,
3297,
29,
4035,
310,
32732,
2201,
2201,
21807,
486,
931,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_parse_colouring() -> Result<(), Error> {
let test_input = "f=[1| 0 , 3 | 2] x o\n\n";
let (_, (parsed_colours, max_colour)) = parse_colouring(5, test_input)?;
assert_eq!(4, max_colour);
assert_eq!(vec![2, 1, 3, 2, DEFAULT_COLOR], parsed_colours);
Ok(()... | rust_cleaned_test_functions.jsonl/46229 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 165
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
56260,
287,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
1077,
1273,
5898,
284,
330,
69,
5818,
16,
91,
220,
220,
15,
220,
1154,
220,
220,
18,
760,
220,
17,
60,
856,
297,
1699,
1699,
87... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_eq_scalar() {
test_generic_scalar::<i32, _>(
vec!["arrow", "parquet", "datafusion", "flight"],
"arrow",
eq_scalar,
vec![true, false, false, false],
)
} | rust_cleaned_test_functions.jsonl/64918 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 142
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10714,
41652,
368,
341,
286,
1273,
41232,
41652,
27638,
72,
18,
17,
11,
716,
17055,
310,
7486,
0,
1183,
6044,
497,
330,
1732,
23300,
497,
330,
691,
54565,
497,
330,
38390,
8097,
310,
330,
6044,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_local_state_storage() -> Result<()> {
init_for_e2e_testing();
let (mock_chain_service, _handle) = MockChainClient::new();
let client = Arc::new(mock_chain_service.clone());
let account_address = AccountAddress::random();
faucet_sync(mock_chain_service, account_address, 1_000_... | rust_cleaned_test_functions.jsonl/111154 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 243
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13564,
4387,
23310,
368,
1464,
5714,
71698,
341,
262,
2930,
5478,
2204,
17,
68,
70962,
543,
262,
1077,
320,
16712,
30583,
12267,
11,
716,
8192,
8,
284,
14563,
18837,
2959,
486,
931,
543,
262,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_from_vec_int() {
let s: Series<i64, usize> = Series::from(vec![1, 2, 3]);
let exp: Series<i64, usize> = Series::new(vec![1, 2, 3], vec![0, 1, 2]);
assert_eq!(s, exp);
} | rust_cleaned_test_functions.jsonl/77388 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 118
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
13251,
4042,
368,
341,
286,
1077,
274,
25,
11131,
21897,
21,
19,
11,
22301,
29,
284,
11131,
486,
1499,
25592,
20703,
16,
11,
220,
17,
11,
220,
18,
2558,
286,
1077,
1343,
25,
11131,
21897... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_role() {
let mut cmd1 = Command::cargo_bin("factomd").unwrap();
let mut cmd2 = Command::cargo_bin("factomd").unwrap();
let mut cmd3 = Command::cargo_bin("factomd").unwrap();
let mut cmd4 = Command::cargo_bin("factomd").unwrap();
cmd1.arg("--role").arg("FULL").assert().succes... | rust_cleaned_test_functions.jsonl/86577 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 197
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19792,
368,
341,
262,
1077,
5206,
5439,
16,
284,
7348,
486,
66715,
21816,
445,
33110,
316,
67,
1827,
15454,
543,
262,
1077,
5206,
5439,
17,
284,
7348,
486,
66715,
21816,
445,
33110,
316,
67,
182... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_merge_multivalued_int_fields() {
let mut schema_builder = schema::SchemaBuilder::default();
let int_options = IntOptions::default()
.set_fast(Cardinality::MultiValues)
.set_indexed();
let int_field = schema_builder.add_u64_field("intvals", int_opti... | rust_cleaned_test_functions.jsonl/72014 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2466
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
26290,
3936,
3260,
4042,
12132,
368,
341,
286,
1077,
5206,
10802,
28532,
284,
10802,
486,
8632,
3297,
486,
2258,
543,
286,
1077,
526,
8743,
284,
1333,
3798,
486,
2258,
741,
310,
659,
746,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_github_cert() {
Context::new(
"github",
"github.com",
&[
include_bytes!("testdata/cert-github.0.der"),
include_bytes!("testdata/cert-github.1.der"),
],
)
.bench(100)
} | rust_cleaned_test_functions.jsonl/801 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 142
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
3827,
37097,
368,
341,
262,
9608,
486,
931,
1006,
286,
330,
5204,
756,
286,
330,
5204,
905,
756,
286,
609,
9640,
310,
2924,
12524,
17223,
92425,
2899,
529,
2371,
3827,
13,
15,
75819,
4461,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_analyze_function() {
let b = ast::BaseNode::default();
let pkg = ast::Package {
base: b.clone(),
path: "path".to_string(),
package: "main".to_string(),
files: vec![ast::File {
base: b.clone(),
name: "... | rust_cleaned_test_functions.jsonl/61562 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 7413
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12008,
55856,
9174,
368,
341,
286,
1077,
293,
284,
11763,
486,
3978,
1955,
486,
2258,
543,
286,
1077,
24793,
284,
11763,
486,
13100,
341,
310,
2331,
25,
293,
15997,
3148,
310,
1815,
25,
330,
234... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rect_points() {
assert_eq!(
Rect::new(10, 20, 100, 200),
rect_points(PixelsXY { x: 10, y: 20 }, PixelsXY { x: 110, y: 220 })
);
assert_eq!(
Rect::new(10, 20, 100, 200),
rect_points(PixelsXY { x: 110, y: 20 }, PixelsXY { x: 1... | rust_cleaned_test_functions.jsonl/15259 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 748
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16979,
12928,
368,
341,
286,
2060,
10714,
33673,
310,
11920,
486,
931,
7,
16,
15,
11,
220,
17,
15,
11,
220,
16,
15,
15,
11,
220,
17,
15,
15,
1326,
310,
7608,
12928,
5304,
10274,
16356,
314,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_syscall_parameter_on_stack() {
test_interpreter_and_jit_asm!(
"
mov64 r1, r10
add64 r1, -0x100
mov64 r2, 0x1
syscall BpfSyscallString
mov64 r0, 0x0
exit",
[],
(
b"BpfSyscallString" => syscalls::BpfSyscallStri... | rust_cleaned_test_functions.jsonl/59037 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 260
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20344,
6659,
24899,
4470,
15528,
368,
341,
262,
1273,
15318,
28637,
8378,
5374,
275,
67529,
33673,
286,
6228,
286,
1974,
21,
19,
435,
16,
11,
435,
16,
15,
198,
286,
912,
21,
19,
435,
16,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_check_program_subscribe_for_missing_optimistically_confirmed_slot() {
// Testing if we can get the pubsub notification if a slot does not
// receive OptimisticallyConfirmed but its descendant slot get the confirmed
// notification.
let GenesisConfigInfo {
... | rust_cleaned_test_functions.jsonl/14337 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3388
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
25096,
88935,
5478,
40447,
15032,
318,
37110,
16059,
8434,
27563,
368,
341,
286,
442,
26768,
421,
582,
646,
633,
279,
6675,
1966,
11540,
421,
264,
9446,
1558,
537,
198,
286,
442,
5258,
30097... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_show_stories() -> Result<(), Box<dyn Error>> {
setup();
let client = JsonClient::new();
let ids = client.show_stories()?;
log::debug!("ids = {:?}", ids);
Ok(())
} | rust_cleaned_test_functions.jsonl/106545 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 114
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15267,
1261,
2433,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
286,
6505,
1428,
286,
1077,
2943,
284,
8308,
2959,
486,
931,
543,
286,
1077,
14151,
284,
2943,
5460,
1261,
2433,
94136,
286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
#[test]
fn test_from_static_custom_long_uppercase() {
HeaderName::from_static(
"Longer-Than-63--ThisHeaderIsLongerThanSixtyThreeCharactersAndThusHandledDifferent",
);
} | rust_cleaned_test_functions.jsonl/3414 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 94
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
25360,
15875,
17799,
34445,
5638,
368,
341,
286,
12104,
675,
486,
1499,
25360,
1006,
310,
330,
6583,
261,
12,
26067,
12,
21,
18,
313,
1986,
4047,
3872,
6583,
261,
26067,
41460,
1881,
19641,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_row() {
assert_eq!(row(""), Row::Blank);
assert_eq!(row("# comment"), Row::Comment("comment"));
assert_eq!(
row("f1,f2,DIRECT"),
Row::Record(Record {
domain: "f1",
account_id: "f2",
relation: Relation::Direct,
authority_... | rust_cleaned_test_functions.jsonl/95250 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 293
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8530,
368,
341,
262,
2060,
10714,
10297,
651,
86076,
10801,
486,
22770,
317,
262,
2060,
10714,
10297,
651,
3584,
3980,
3975,
10801,
486,
10677,
445,
6182,
4010,
262,
2060,
10714,
33673,
286,
2802,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parsing_invalid_validator_value_type() {
match read_single_check("checks/tests/test11.json") {
Some(_) => assert!(false),
None => assert!(true),
}
} | rust_cleaned_test_functions.jsonl/80338 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 108
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
28598,
31433,
64959,
3142,
1819,
368,
341,
286,
2432,
1349,
19487,
7200,
445,
49383,
62468,
12697,
16,
16,
4323,
899,
341,
310,
4329,
48139,
589,
2060,
10297,
3849,
1326,
310,
2240,
589,
2060... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
#[test]
fn test_myers_long_overflow() {
let pattern = b"AAGACGAGAAAAGAAAGTCTAAAGGACTTTTGTGGCAAGACCATCCCTGTTCCCAACCCGACCCCTGGACCTCCCGCCCCGGGCACTCCCGACCCCCCGACCCCCCGACTCCTGGACCAGGAGACTGA";
let text = b"GGCAAGGGGGACTGTAGATGGGTGAAAAGAGCAGTCAGGGACCAGGTCCTCAGCCCCCCAGCCCCCCAGCCCTCCAGGTCCCCAGCCCTCCAGGTC... | rust_cleaned_test_functions.jsonl/21452 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 308
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35686,
388,
17799,
79073,
368,
341,
286,
1077,
5383,
284,
293,
29133,
1890,
1706,
38,
1890,
50107,
1890,
6029,
1890,
51,
1162,
6029,
1890,
38,
6823,
14903,
51,
25388,
22254,
5049,
1890,
1706,
2819... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_list_attempts_for_endpoint_query_parameters_validation() {
let q: ListAttemptsForEndpointQueryParameters =
serde_json::from_value(json!({ "channel": INVALID_CHANNEL })).unwrap();
assert!(q.validate().is_err());
let q: ListAttemptsForEndpointQueryParameters =
... | rust_cleaned_test_functions.jsonl/64494 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 190
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2019,
79490,
5478,
36699,
5738,
18263,
19416,
368,
341,
286,
1077,
2804,
25,
1759,
81517,
2461,
27380,
2859,
9706,
4035,
310,
61570,
9455,
486,
1499,
3142,
9304,
0,
2306,
330,
10119,
788,
32269,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_file_reader_iter_projection_err() {
let schema = "
message spark_schema {
REQUIRED INT32 key;
REQUIRED BOOLEAN value;
}
";
let proj = parse_message_type(&schema).ok();
let path = get_test_path("nested_maps.snappy.parquet");
let read... | rust_cleaned_test_functions.jsonl/69597 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 294
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
22306,
11723,
72738,
9266,
368,
341,
286,
1077,
10802,
284,
6228,
414,
1943,
15186,
25371,
341,
286,
66577,
9221,
18,
17,
1376,
280,
286,
66577,
59393,
897,
280,
414,
456,
262,
7620,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sum_two_singles() {
assert_eq!(sum_two_singles(1.111111, 1.111111), 2.222222);
} | rust_cleaned_test_functions.jsonl/123618 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 65
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10160,
23241,
643,
49603,
368,
972,
286,
2060,
10714,
10297,
1242,
23241,
643,
49603,
7,
16,
13,
16,
16,
16,
16,
16,
16,
11,
220,
16,
13,
16,
16,
16,
16,
16,
16,
701,
220,
17,
13,
17,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_reserve() {
let mut map = TypedHandleMap::<u32>::with_capacity(10);
let cap0 = map.capacity();
map.reserve(cap0 + 10);
assert!(map.capacity() >= cap0 + 10);
} | rust_cleaned_test_functions.jsonl/15924 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 106
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
89591,
368,
341,
286,
1077,
5206,
2415,
284,
50554,
6999,
2227,
27638,
84,
18,
17,
6831,
4197,
35603,
7,
16,
15,
317,
286,
1077,
2062,
15,
284,
2415,
59168,
543,
286,
2415,
48520,
51386,
15,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_rchunks_next() {
let v = [0, 1, 2, 3, 4, 5];
let mut c = v.rchunks(2);
assert_eq!(c.next().unwrap(), &[4, 5]);
assert_eq!(c.next().unwrap(), &[2, 3]);
assert_eq!(c.next().unwrap(), &[0, 1]);
assert_eq!(c.next(), None);
let v = [0, 1, 2, 3, 4, 5, 6, 7];
let mut c ... | rust_cleaned_test_functions.jsonl/9663 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 265
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
84263,
11257,
368,
341,
262,
1077,
348,
284,
508,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
262,
1077,
5206,
272,
284,
348,
1746,
84263,
7,
17,
317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sha_file_existing() {
let mut wiki = Wiki::new();
let input_dir = "tests/example_md/real_md";
assert!(wiki.read_from_directory(input_dir).is_ok());
assert!(wiki.read_content_from_current_paths(input_dir, "html2").is_ok());
let sha_file = Path::new("html2").join(".files.sha");... | rust_cleaned_test_functions.jsonl/117359 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 180
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48836,
2458,
62630,
368,
341,
262,
1077,
5206,
28609,
284,
29228,
486,
931,
543,
262,
1077,
1946,
4334,
284,
330,
23841,
65182,
32994,
14,
7951,
32994,
876,
262,
2060,
10297,
29707,
4125,
5673,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_deactivate_device() {
let mut d = TestDevices::default();
let core_a = MockDeviceId(1);
let a = d.add_active_device(core_a, 10).unwrap();
let b = d.add_device(20);
assert_eq!(d.deactivate_device(b).unwrap_err(), ToggleError::NoChange);
assert_eq!(d... | rust_cleaned_test_functions.jsonl/19848 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 321
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2259,
16856,
9204,
368,
341,
286,
1077,
5206,
294,
284,
3393,
40835,
486,
2258,
543,
286,
1077,
6200,
4306,
284,
14563,
6985,
764,
7,
16,
317,
286,
1077,
264,
284,
294,
1364,
12930,
9204,
47867,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decode_enum() {
let value: Animal = super::decode("\"Dog\"").unwrap();
assert_eq!(value, Dog);
let s = "{\"variant\":\"Frog\",\"fields\":[\"Henry\",349]}";
let value: Animal = super::decode(s).unwrap();
assert_eq!(value, Frog("Henry".into_string(), 349));... | rust_cleaned_test_functions.jsonl/6556 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 145
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
31054,
368,
341,
286,
1077,
897,
25,
21292,
284,
2256,
486,
18196,
38915,
48940,
2105,
1827,
15454,
543,
286,
2060,
10714,
10297,
957,
11,
14254,
626,
286,
1077,
274,
284,
54734,
15969,
234... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_doc_to_opstamp_mapping_none() {
let doc_to_opstamp_mapping = DocToOpstampMapping::None;
assert!(doc_to_opstamp_mapping.is_deleted(1u32, 0u64));
assert!(doc_to_opstamp_mapping.is_deleted(1u32, 2u64));
} | rust_cleaned_test_functions.jsonl/53519 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 133
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18869,
2346,
10287,
49113,
26930,
31488,
368,
341,
286,
1077,
4629,
2346,
10287,
49113,
26930,
284,
21709,
1249,
7125,
49113,
6807,
486,
4064,
280,
286,
2060,
10297,
5236,
2346,
10287,
49113,
26930,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_boolean_and() {
let variants = [
OperandType::True,
OperandType::False,
OperandType::AllocatedTrue,
OperandType::AllocatedFalse,
OperandType::NegatedAllocatedTrue,
OperandType::NegatedAllocatedFalse
];
... | rust_cleaned_test_functions.jsonl/10418 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3644
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46642,
8378,
368,
341,
286,
1077,
26012,
284,
2278,
310,
61085,
929,
486,
2514,
345,
310,
61085,
929,
486,
4049,
345,
310,
61085,
929,
486,
25154,
657,
2514,
345,
310,
61085,
929,
486,
25154,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_parse_module_jsx_import_source() {
let specifier = ModuleSpecifier::parse("file:///a/test01.tsx").unwrap();
let result = parse_module(
&specifier,
None,
Arc::new(
r#"
/** @jsxImportSource https://example.com/preact */
export function A() {
return ... | rust_cleaned_test_functions.jsonl/94373 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 478
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
10750,
26250,
87,
18434,
10347,
368,
341,
262,
1077,
97616,
284,
13711,
87297,
486,
6400,
445,
1192,
60896,
64,
12697,
15,
16,
21288,
87,
1827,
15454,
543,
262,
1077,
1102,
284,
4715,
10750... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serialize_deserialize_regexp() {
let _guard = LOCK.run_concurrently();
let src = Bson::RegularExpression(Regex {
pattern: "1".to_owned(),
options: "2".to_owned(),
});
let dst = vec![14, 0, 0, 0, 11, 107, 101, 121, 0, 49, 0, 50, 0, 0];
let doc = doc! { "key": ... | rust_cleaned_test_functions.jsonl/49144 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 235
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
15768,
9050,
4920,
4580,
368,
341,
262,
1077,
716,
26098,
284,
49463,
7634,
3382,
58202,
543,
262,
1077,
2286,
284,
425,
930,
486,
90402,
7,
32464,
341,
286,
5383,
25,
330,
16,
3263,
983,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_custom_pattern() -> Result<(), Box<dyn std::error::Error>> {
let mut cmd = Command::cargo_bin("maxtract")?;
cmd.arg(common::get_uri()).arg("--regex").arg("child_\\d+");
let expected = "file:///home/josh/CLionProjects/maxtract/tests/pages/child_00.html
├─ child_00
├─ child_10
file:/... | rust_cleaned_test_functions.jsonl/67453 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 290
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15875,
21260,
368,
1464,
5714,
68843,
8261,
92846,
1460,
486,
841,
486,
1454,
2452,
341,
262,
1077,
5206,
5439,
284,
7348,
486,
66715,
21816,
445,
2810,
2144,
899,
69493,
262,
5439,
21186,
57802,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_build_upload_policy_with_normal_storage() -> Result<(), Box<dyn Error>> {
let policy = UploadPolicyBuilder::new_policy_for_bucket("test_bucket", &Config::default())
.normal_storage()
.build();
assert_eq!(policy.is_normal_storage_used(), true);
asse... | rust_cleaned_test_functions.jsonl/2354 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20801,
21691,
22773,
6615,
13973,
23310,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
286,
1077,
4842,
284,
24996,
13825,
3297,
486,
931,
22773,
5478,
38749,
445,
1944,
38749,
497,
609,
264... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_get_oldest_ancestor() {
// smt0 - smt00 - smt000 - smt0000 - smt00000
// |\ smt001 - smt0010 - smt00100
// | smt0011 - smt00110
// | smt00111
// smt002
let smt0 = Sparse... | rust_cleaned_test_functions.jsonl/63261 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1886
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
62,
337,
4979,
62,
66878,
368,
341,
262,
442,
1525,
83,
15,
481,
1525,
83,
15,
15,
481,
1525,
83,
15,
15,
15,
481,
1525,
83,
15,
15,
15,
15,
481,
1525,
83,
15,
15,
15,
15,
15,
72... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_device() {
let ua_parser = UserAgentParser::from_path("uap-core/regexes.yaml").unwrap();
let yaml = fs::read_to_string("uap-core/tests/test_device.yaml").unwrap();
let yamls = YamlLoader::load_from_str(&yaml).unwrap();
let yaml = &yamls[0];
let test_cases = yaml
.a... | rust_cleaned_test_functions.jsonl/111012 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 581
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9204,
368,
341,
262,
1077,
45559,
18517,
284,
2657,
16810,
6570,
486,
1499,
2638,
445,
84,
391,
23460,
14,
26387,
288,
33406,
1827,
15454,
1428,
262,
1077,
32246,
284,
8619,
486,
878,
2346,
3904,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_encode_decode_tsig() {
test_encode_decode(TSIG::new(
TsigAlgorithm::HmacSha256,
0,
300,
vec![0, 1, 2, 3],
0,
0,
vec![4, 5, 6, 7],
));
test_encode_decode(TSIG::new(
TsigAlgorith... | rust_cleaned_test_functions.jsonl/60097 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 510
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
15227,
528,
21339,
368,
341,
286,
1273,
11224,
15227,
4140,
50631,
486,
931,
1006,
310,
350,
21339,
27847,
486,
39,
11948,
62316,
17,
20,
21,
345,
310,
220,
15,
345,
310,
220,
18,
15,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_constraint_two_ident() {
let mut p = Parser::new(r#"A: Addable + Subtractable"#);
let parsed = p.parse_constraints();
let loc = Locator::new(&p.source[..]);
assert_eq!(
parsed,
vec![TypeConstraint {
base: BaseNode {
location: loc.... | rust_cleaned_test_functions.jsonl/67834 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 766
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
46973,
23241,
38399,
368,
341,
262,
1077,
5206,
281,
284,
21102,
486,
931,
2601,
55543,
32,
25,
2691,
480,
488,
93210,
480,
57676,
317,
262,
1077,
15676,
284,
281,
4632,
60267,
543,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_yaw_only() {
let (yaw, pitch) = yaw_and_pitch_from_vector(&Vector3::new(1.0, 0.0, 0.0));
assert_relative_eq!(yaw, f32::pi() / 2.0);
assert_relative_eq!(pitch, 0.0);
let (yaw, pitch) = yaw_and_pitch_from_vector(&Vector3::new(-1.0, 0.0, 0.0));
assert_relati... | rust_cleaned_test_functions.jsonl/106182 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 216
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
80183,
18410,
368,
341,
286,
1077,
320,
98586,
11,
9649,
8,
284,
45672,
8378,
51959,
5673,
12247,
2099,
3781,
18,
486,
931,
7,
16,
13,
15,
11,
220,
15,
13,
15,
11,
220,
15,
13,
15,
1106,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_affine_group() {
let mut rng = test_rng();
let a: EdwardsAffine = rng.gen();
let b: EdwardsAffine = rng.gen();
for _i in 0..100 {
group_test::<EdwardsAffine>(a, b);
}
} | rust_cleaned_test_functions.jsonl/10054 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 107
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48914,
482,
6288,
368,
341,
262,
1077,
5206,
28422,
284,
1273,
66849,
543,
262,
1077,
264,
25,
36763,
25841,
482,
284,
28422,
22822,
543,
262,
1077,
293,
25,
36763,
25841,
482,
284,
28422,
22822,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_decode_ok_packet() {
const DATA: &[u8] = b"\x00\x00\x00\x02@\x00\x00";
let p = OkPacket::decode(DATA.into()).unwrap();
assert_eq!(p.affected_rows, 0);
assert_eq!(p.last_insert_id, 0);
assert_eq!(p.warnings, 0);
assert!(p.status.contains(Status::SERVER_STATUS_AUTOCOMMIT)... | rust_cleaned_test_functions.jsonl/99058 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 189
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
19817,
21078,
368,
341,
262,
733,
14112,
25,
44590,
84,
23,
60,
284,
293,
11934,
87,
15,
15,
3462,
15,
15,
3462,
15,
15,
3462,
15,
17,
66339,
87,
15,
15,
3462,
15,
15,
3302,
262,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pubkey_from_slice_bad_context() {
let s = Secp256k1::without_caps();
let sk = SecretKey::new(&mut thread_rng());
assert_eq!(PublicKey::from_secret_key(&s, &sk), Err(IncapableContext));
let s = Secp256k1::with_caps(ContextFlag::VerifyOnly);
assert_eq!(Publ... | rust_cleaned_test_functions.jsonl/41394 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 281
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34014,
792,
5673,
26488,
34199,
8467,
368,
341,
286,
1077,
274,
284,
4520,
79,
17,
20,
21,
74,
16,
486,
28996,
52955,
543,
286,
1077,
1901,
284,
8599,
1592,
486,
931,
2099,
6984,
4516,
66849,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fold_useless_do_1() {
test("do { foo() } while(false);", "foo()");
test("do { foo() } while(void 0);", "foo()");
test("do { foo() } while(undefined);", "foo()");
test("do { foo() } while(true);", "for(;;) foo();");
test("do { var a = 0; } while(false);", "var a=0");
} | rust_cleaned_test_functions.jsonl/378 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 137
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
61187,
15951,
1717,
26309,
62,
16,
368,
341,
262,
1273,
445,
2982,
314,
15229,
368,
335,
1393,
3576,
1215,
497,
330,
7975,
45961,
262,
1273,
445,
2982,
314,
15229,
368,
335,
1393,
4333,
220,
15,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_crc32() {
if is_x86_feature_detected!("sse4.2") {
unsafe {
let result = crc32_hash(b"hello", 123);
assert_eq!(result, 2927487359);
let result = crc32_hash(b"helloworld", 123);
assert_eq!(result, 314229527);
... | rust_cleaned_test_functions.jsonl/3347 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 270
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
59084,
18,
17,
368,
341,
286,
421,
374,
3212,
23,
21,
17069,
98876,
17223,
64513,
19,
13,
17,
899,
341,
310,
19860,
341,
394,
1077,
1102,
284,
37180,
18,
17,
8950,
1883,
1,
14990,
497,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_pull_request_opened() {
let mut test = new_test();
test.handler.event = "pull_request".into();
test.handler.action = "opened".into();
test.handler.data.pull_request = some_pr();
test.handler.data.sender = User::new("the-pr-owner");
test.github.mock_get_pull_request_commit... | rust_cleaned_test_functions.jsonl/89638 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 444
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
65693,
7893,
11311,
291,
368,
341,
262,
1077,
5206,
1273,
284,
501,
4452,
543,
262,
1273,
31171,
5773,
284,
330,
23441,
7893,
3263,
18122,
543,
262,
1273,
31171,
12395,
284,
330,
56128,
3263,
1812... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_skipmap_iterator() {
let skm = make_skipmap();
let mut i = 0;
for (k, v) in LdbIteratorIter::wrap(&mut skm.iter()) {
assert!(!k.is_empty());
assert!(!v.is_empty());
i += 1;
}
assert_eq!(i, 26);
} | rust_cleaned_test_functions.jsonl/89157 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 171
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44830,
2186,
13491,
368,
341,
286,
1077,
1901,
76,
284,
1281,
44830,
2186,
543,
286,
1077,
5206,
600,
284,
220,
15,
401,
286,
369,
320,
74,
11,
348,
8,
304,
444,
1999,
11951,
8537,
486,
10097,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_calculate_code_for_row_and_column() {
assert_eq!(FIRST_CODE, calculate_code_for_row_and_column(1, 1));
assert_eq!(31_916_031, calculate_code_for_row_and_column(2, 1));
assert_eq!(18_749_137, calculate_code_for_row_and_column(1, 2));
assert_eq!(16_080_970, calculat... | rust_cleaned_test_functions.jsonl/64658 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 246
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24005,
11207,
4136,
5478,
8530,
8378,
8744,
368,
341,
286,
2060,
10714,
10297,
67792,
10020,
11,
11047,
4136,
5478,
8530,
8378,
8744,
7,
16,
11,
220,
16,
1106,
286,
2060,
10714,
10297,
18,
16,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_exchange_code_with_400_status_code() {
let body = r#"{"error":"invalid_request","error_description":"Expired code."}"#;
let client = new_client();
let token = client
.exchange_code(AuthorizationCode::new("ccc".to_string()))
.request(mock_http_client(
vec![... | rust_cleaned_test_functions.jsonl/18607 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 794
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
59212,
4136,
6615,
62,
19,
15,
15,
4773,
4136,
368,
341,
262,
1077,
2487,
284,
435,
55543,
4913,
841,
3252,
11808,
7893,
2198,
841,
11448,
3252,
54349,
2038,
1189,
9863,
2,
280,
262,
1077,
2943,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_find_succeeding() {
let mut output = String::new();
let method = StringMethod {
method: "find",
variable: "$FOO",
pattern: "\"O\"",
selection: Select::All,
};
method.handle(&mut output, &VariableExpander);
... | rust_cleaned_test_functions.jsonl/85296 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 182
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
643,
29264,
287,
368,
341,
286,
1077,
5206,
2550,
284,
923,
486,
931,
543,
286,
1077,
1714,
284,
923,
3523,
341,
310,
1714,
25,
262,
330,
3903,
756,
310,
3890,
25,
220,
5201,
3788,
46,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_remove_comments_empty_multiline() {
let example: Vec<char> = "/**//* */test".to_string().chars().collect();
let result = remove_comments(&example);
let without_comments = chars_to_string(&result.without_comments);
assert_eq!(" test", without_comments);
a... | rust_cleaned_test_functions.jsonl/126904 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 196
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
30359,
15124,
26290,
26560,
368,
341,
286,
1077,
3110,
25,
11312,
21919,
29,
284,
3521,
334,
21417,
639,
1944,
3263,
983,
3904,
1005,
19255,
1005,
17384,
543,
286,
1077,
1102,
284,
4057,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_1() {
#[derive(DeepSizeOf)]
struct Example<'a>(&'a u32, &'a u32);
let number = &42;
let example = Example(number, number);
let size = example.deep_size_of();
// Data past references is not counted
assert_eq!(size, 2 * size_of::<usize>());... | rust_cleaned_test_functions.jsonl/9196 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 156
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
16,
368,
341,
286,
11506,
27098,
7,
33464,
1695,
2124,
5563,
286,
2036,
13383,
18291,
64,
44784,
6,
64,
575,
18,
17,
11,
30136,
64,
575,
18,
17,
626,
286,
1077,
1372,
284,
609,
19,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_request() {
use helix::*;
let req = GetEmoteSetsRequest::builder()
.emote_set_id(vec!["301590448".into()])
.build();
// From twitch docs
let data = br#"
{
"data": [
{
"id": "304456832",
"name": "twitchdevPitchfork",
... | rust_cleaned_test_functions.jsonl/55332 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 803
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7893,
368,
341,
262,
990,
11338,
941,
56162,
262,
1077,
4232,
284,
2126,
2269,
1272,
30175,
1900,
486,
17850,
741,
286,
659,
336,
1272,
2602,
842,
25592,
0,
1183,
18,
15,
16,
20,
24,
15,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_simple_func() {
let isa = lookup(triple!("x86_64"))
.expect("expect x86 ISA")
.as_builder()
.finish(Flags::new(builder()));
let mut context = Context::for_function(create_function(
CallConv::SystemV,
Some(StackSlotData:... | rust_cleaned_test_functions.jsonl/103557 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1068
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
9596,
368,
341,
286,
1077,
51335,
284,
18615,
7624,
3778,
17223,
87,
23,
21,
62,
21,
19,
5455,
310,
659,
17119,
445,
17119,
856,
23,
21,
84290,
1138,
310,
659,
300,
28532,
741,
310,
659... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_inet_aton() {
let cases = vec![
(Datum::Bytes(b"0.0.0.0".to_vec()), Datum::I64(0)),
(
Datum::Bytes(b"255.255.255.255".to_vec()),
Datum::I64(4294967295),
),
(Datum::Bytes(b"127.0.0.1".to_vec()), Datum::I64(213... | rust_cleaned_test_functions.jsonl/75116 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 892
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
295,
3752,
263,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
320,
68036,
486,
7078,
1883,
1,
15,
13,
15,
13,
15,
13,
15,
3263,
983,
13251,
11858,
68459,
486,
40,
21,
19,
7,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_filter_normal_code() {
let s = r#"
fn main() {
println!("hello, world");
}
"#;
assert_eq!(s, filter_normal_code(s));
let s_with_line_comment = r#"
fn main() {
// hello, world
println!("hello, world");
}
"#;
assert_eq!(s, filter_normal_code(s_with_line_... | rust_cleaned_test_functions.jsonl/65549 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 339
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8727,
13973,
4136,
368,
341,
286,
1077,
274,
284,
435,
2,
698,
8822,
1887,
368,
341,
262,
13751,
17223,
14990,
11,
1879,
797,
532,
57676,
280,
286,
2060,
10714,
10297,
82,
11,
4051,
13973,
4136,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_once_reset() {
let mut spawner = Spawner::once(5.0.into(), true);
spawner.tick(1.0);
spawner.reset();
let count = spawner.tick(1.0);
assert_eq!(count, 5);
} | rust_cleaned_test_functions.jsonl/83393 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 117
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7630,
18983,
368,
341,
286,
1077,
5206,
978,
67193,
284,
3089,
67193,
486,
13184,
7,
20,
13,
15,
39860,
1507,
830,
317,
286,
978,
67193,
40323,
7,
16,
13,
15,
317,
286,
978,
67193,
13857,
543,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_no_duplicate_thermal_state_update() {
// expected thermal state
let thermal_load = ThermalLoad(25);
let trip_points = vec![ThermalLoad(50)];
let expected_thermal_state = 0;
let mut exec = fasync::Executor::new().unwrap();
let node = setup... | rust_cleaned_test_functions.jsonl/76810 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 469
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
70434,
62,
68118,
4387,
8882,
368,
341,
1789,
286,
442,
3601,
28387,
1584,
198,
286,
1077,
28387,
12411,
284,
65626,
5879,
7,
17,
20,
317,
286,
1077,
8411,
12928,
284,
7486,
20703,
1001,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_remove_nested_other() {
use crate::protocol::User;
let mut event = Annotated::new(Event {
user: Annotated::from(User {
other: {
let mut other = Object::new();
other.insert("foo".to_string(), Value::U64(42).into());
othe... | rust_cleaned_test_functions.jsonl/14152 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 337
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
66279,
30456,
368,
341,
262,
990,
17717,
486,
17014,
486,
1474,
401,
262,
1077,
5206,
1538,
284,
1527,
87029,
486,
931,
30469,
341,
286,
1196,
25,
1527,
87029,
486,
1499,
13087,
341,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_format_utc_time() {
let mut local_options = LocalOptions::default();
let timestamp = 636253000631621;
local_options.clock = Clock::UTC;
local_options.time_format = "%H:%M:%S %d/%m/%Y".to_string();
let timestamp_utc_formatted = local_options.format_time(ti... | rust_cleaned_test_functions.jsonl/113589 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 372
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8955,
84259,
3009,
368,
341,
286,
1077,
5206,
2205,
8743,
284,
8774,
3798,
486,
2258,
543,
286,
1077,
11441,
284,
220,
21,
18,
21,
17,
20,
18,
15,
15,
15,
21,
18,
16,
21,
17,
16,
280,
286,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_origin_point() {
assert!((Point::origin().norm() - 1.).abs() <= EPSILON);
// The point chosen below is about 66km from the north pole towards the East
// origin as far away as possible from the longitudinal edges of large
// Cells. (The line of longitude... | rust_cleaned_test_functions.jsonl/70553 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 322
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34043,
6085,
368,
341,
286,
2060,
0,
1188,
2609,
486,
8611,
1005,
20011,
368,
481,
220,
16,
35334,
3435,
368,
2651,
40607,
55016,
626,
286,
442,
576,
1459,
11882,
3685,
374,
911,
220,
21,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_type_16() {
let ast = check_parse("type rec = {i64 f};");
check_name(ast.get(0),"rec");
assert_eq!(ast.get(1),&Node::IntType(true,64));
check_name(ast.get(2),"f");
assert_eq!(ast.get(3),&Node::RecordType(vec![(Type(1),Name(2))]));
} | rust_cleaned_test_functions.jsonl/96546 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 133
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1819,
62,
16,
21,
368,
341,
262,
1077,
11763,
284,
1779,
21039,
445,
1313,
1395,
284,
314,
72,
21,
19,
282,
11061,
797,
262,
1779,
1269,
52574,
670,
7,
15,
35393,
2758,
797,
262,
2060,
10714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_domain_parse_empty_message() {
const PACKET: [u8; 1] = [0];
let mut bv = BufferViewWrapper(&PACKET[..]);
assert_eq!(Domain::parse(&mut bv, None).unwrap_err(), ParseError::UnexpectedZeroCharacter);
} | rust_cleaned_test_functions.jsonl/34446 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20111,
21039,
15124,
6462,
368,
341,
286,
733,
73205,
25,
508,
84,
23,
26,
220,
16,
60,
284,
508,
15,
935,
286,
1077,
5206,
56937,
284,
10312,
851,
11542,
2099,
17279,
1348,
95874,
2558,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_extension_successful_with_complete_json_response() {
use colorful_extension::*;
let mock = mock("POST", "/token")
.match_header("Accept", "application/json")
.match_body("grant_type=authorization_code&code=ccc&client_id=aaa&client_secret=bbb")
.with_header("conte... | rust_cleaned_test_functions.jsonl/12782 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 931
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31035,
92951,
6615,
27675,
9455,
9655,
368,
341,
262,
990,
33866,
31035,
79304,
262,
1077,
7860,
284,
7860,
445,
2946,
497,
3521,
5839,
1138,
286,
659,
6347,
8757,
445,
16646,
497,
330,
5132,
8931... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mod_int() {
let tests = vec![
(Some(13), Some(11), Some(2)),
(Some(-13), Some(11), Some(-2)),
(Some(13), Some(-11), Some(2)),
(Some(-13), Some(-11), Some(-2)),
(Some(33), Some(11), Some(0)),
(Some(33), Some(-11), Som... | rust_cleaned_test_functions.jsonl/78966 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 573
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7480,
4042,
368,
341,
286,
1077,
7032,
284,
7486,
90515,
310,
320,
8373,
7,
16,
18,
701,
4329,
7,
16,
16,
701,
4329,
7,
17,
6965,
310,
320,
8373,
4080,
16,
18,
701,
4329,
7,
16,
16,
701,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_long_format() {
let login = "root";
let pw: Passwd = Passwd::locate(login).unwrap();
let user_info = pw.user_info.unwrap_or_default();
let user_dir = pw.user_dir.unwrap_or_default();
let user_shell = pw.user_shell.unwrap_or_default();
let real_name = user_info.replace('&'... | rust_cleaned_test_functions.jsonl/85401 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 387
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17799,
8955,
368,
341,
262,
1077,
5858,
284,
330,
2888,
876,
262,
1077,
26581,
25,
9970,
6377,
284,
9970,
6377,
486,
22401,
31587,
568,
15454,
543,
262,
1077,
1196,
3109,
284,
26581,
3324,
3109,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compile_not_d() {
let compiled = bitwise::compile_not("D".to_string());
assert_eq!(compiled.len(), 1);
assert_eq!(compiled[0], 0b01111011);
} | rust_cleaned_test_functions.jsonl/100595 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 82
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74170,
7913,
814,
368,
341,
262,
1077,
19697,
284,
97970,
486,
20433,
7913,
445,
35,
3263,
983,
3904,
5231,
262,
2060,
10714,
10297,
50845,
19406,
1507,
220,
16,
317,
262,
2060,
10714,
10297,
5084... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_prove_pk_prop() {
let secret = DlogProverInput::random();
let pk = secret.public_image();
let tree = ErgoTree::try_from(Expr::Const(pk.into())).unwrap();
let message = vec![0u8; 100];
let prover = TestProver {
secrets: vec![PrivateInput::DlogP... | rust_cleaned_test_functions.jsonl/3883 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 339
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2540,
586,
33321,
21663,
368,
341,
286,
1077,
6234,
284,
422,
839,
1336,
423,
2505,
486,
11463,
543,
286,
1077,
22458,
284,
6234,
37899,
4954,
543,
286,
1077,
4916,
284,
73202,
78,
6533,
486,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_make_absolute_slash_path() {
crate::history::clear();
crate::history::append("gemini://typed-hole.org");
let url = "/foo";
let expected_url = Url::parse("gemini://typed-hole.org/foo").unwrap();
let absolute_url = Gemini {
source: String::from(url),
}
.to_abso... | rust_cleaned_test_functions.jsonl/49239 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 163
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28230,
50874,
11886,
988,
2638,
368,
341,
262,
17717,
486,
18844,
486,
7422,
1428,
262,
17717,
486,
18844,
486,
5090,
445,
34103,
6591,
1110,
44181,
86593,
2659,
797,
262,
1077,
2515,
284,
3521,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_deserialize_signature() {
let s = r#""hvA+XXFEkHk80pLMeIYjNkWy5Ds2ZckSrvj00NvbyFJQe3H9LuJNnu8JLZ/ffIzChs3HmhwPldO0MSmyJAYpCA""#;
let _: Signature = serde_json::from_str(s).unwrap();
} | rust_cleaned_test_functions.jsonl/31930 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 139
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
9050,
39859,
368,
341,
286,
1077,
274,
284,
435,
2,
3014,
81979,
32,
10,
6148,
11419,
74,
39,
74,
23,
15,
79,
43,
7823,
40,
56,
73,
45,
74,
66907,
20,
66950,
17,
57,
377,
50,
10553,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_update_gc_purged_fork() {
let key = Keypair::new();
let mut index = AccountsIndex::<bool>::default();
let mut gc = Vec::new();
index.insert(0, &key.pubkey(), true, &mut gc);
assert!(gc.is_empty());
index.insert(1, &key.pubkey(), false, &mut gc);
... | rust_cleaned_test_functions.jsonl/44249 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 373
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
49423,
620,
324,
3556,
761,
669,
368,
341,
286,
1077,
1376,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
5206,
1922,
284,
40655,
1552,
27638,
2641,
6831,
2258,
543,
286,
1077,
5206,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_divide() {
let x = Complex::new(3.0, 4.0);
let y = Complex::new(5.0, 6.0);
let z: Complex = x.divide(&y);
assert_that(39.0 / 61.0, is(close_to(z.get_real(), 1.0e-5)));
assert_that(2.0 / 61.0, is(close_to(z.get_imaginary(), 1.0e-5)));
} | rust_cleaned_test_functions.jsonl/43839 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 170
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16237,
577,
368,
341,
286,
1077,
856,
284,
22096,
486,
931,
7,
18,
13,
15,
11,
220,
19,
13,
15,
317,
286,
1077,
379,
284,
22096,
486,
931,
7,
20,
13,
15,
11,
220,
21,
13,
15,
317,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_dna_string() {
let dna = "ACGTACGT";
let dna_string = DnaString::from_dna_string(dna);
let values: Vec<u8> = dna_string.iter().collect();
assert_eq!(dna_string.len, 8);
assert_eq!(values, [0, 1, 2, 3, 0, 1, 2, 3]);
let dna_cp = dna_string.to... | rust_cleaned_test_functions.jsonl/95212 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 197
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
814,
3376,
3904,
368,
341,
286,
1077,
75334,
284,
330,
1706,
25388,
1706,
25388,
876,
286,
1077,
75334,
3904,
284,
422,
3376,
703,
486,
1499,
814,
3376,
3904,
1500,
3376,
317,
286,
1077,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rotation_look_at_rh_x_axis() {
let direction: Vector3<f64> = Vector3::unit_x();
let up: Vector3<f64> = Vector3::unit_y();
let angle = Degrees(90_f64);
let expected = Rotation3::from_angle_y(angle);
let result = Rotation3::look_at_rh(&direction, &up);
... | rust_cleaned_test_functions.jsonl/70529 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 180
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44813,
24271,
3752,
1710,
71,
3212,
23567,
368,
341,
286,
1077,
5106,
25,
4196,
18,
63895,
21,
19,
29,
284,
4196,
18,
486,
3843,
3212,
543,
286,
1077,
705,
25,
4196,
18,
63895,
21,
19,
29,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_subprotocols() {
let sub_proto = test_utils::custom_subprotocol();
let super_proto = test_utils::custom_protocol();
assert!(sub_proto.conforms_to(super_proto));
#[cfg(feature = "malloc")]
assert_eq!(sub_proto.adopted_protocols()[0], super_proto);
} | rust_cleaned_test_functions.jsonl/7129 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 150
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
85412,
368,
341,
286,
1077,
1186,
37689,
284,
1273,
17309,
486,
9163,
5228,
17014,
543,
286,
1077,
2256,
37689,
284,
1273,
17309,
486,
9163,
34880,
543,
286,
2060,
10297,
1966,
37689,
2862,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_supplies_buy_misc_insufficient() {
let mut supplies = Supplies::new();
let reason = supplies.buy_misc(1000).unwrap_err().reason;
assert_eq!(BuyErrorType::InsufficientFunds, reason);
assert_eq!(700, supplies.money);
assert_eq!(0, supplies.misc);
} | rust_cleaned_test_functions.jsonl/28670 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 135
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23723,
7202,
46348,
69350,
34386,
26683,
368,
341,
286,
1077,
5206,
16720,
284,
50252,
486,
931,
543,
286,
1077,
2874,
284,
16720,
63871,
69350,
7,
16,
15,
15,
15,
568,
15454,
9266,
1005,
19895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_iterator_reverse() {
let data = vec![5, 9, 3];
let iterout = vec![3, 5, 9];
let pq = BinaryHeap::from(data);
let v: Vec<_> = pq.iter().rev().cloned().collect();
assert_eq!(v, iterout);
} | rust_cleaned_test_functions.jsonl/83199 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 107
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13491,
43277,
368,
341,
262,
1077,
821,
284,
7486,
20703,
20,
11,
220,
24,
11,
220,
18,
935,
262,
1077,
5367,
411,
284,
7486,
20703,
18,
11,
220,
20,
11,
220,
24,
935,
262,
1077,
39639,
284,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_select_from_values() {
use crate::values;
let expected_sql = "SELECT `vals`.* FROM (VALUES (?,?),(?,?)) AS `vals`";
let values = Table::from(values!((1, 2), (3, 4))).alias("vals");
let query = Select::from_table(values);
let (sql, params) = Sqlite::build(... | rust_cleaned_test_functions.jsonl/52900 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 320
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13051,
5673,
9146,
368,
341,
286,
990,
17717,
486,
3661,
401,
286,
1077,
3601,
18063,
284,
330,
4858,
1565,
25596,
63,
4908,
4295,
320,
46089,
63985,
30,
23547,
12622,
30,
593,
5752,
1565,
25596,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_part1_example1() {
let input = r#"
COM)B
B)C
C)D
D)E
E)F
B)G
G)H
D)I
E)J
J)K
K)L
"#;
assert_eq!(part1(&to_lines(input)), 42);
} | rust_cleaned_test_functions.jsonl/90091 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10495,
16,
39304,
16,
368,
341,
286,
1077,
1946,
284,
435,
2,
698,
8696,
8,
33,
198,
33,
8,
34,
198,
34,
8,
35,
198,
35,
8,
36,
198,
36,
8,
37,
198,
33,
8,
38,
198,
38,
8,
39,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_case2() {
assert_eq!(
Solution::reorder_log_files(vec_string![
"dig1 8 1 5 1",
"let1 art can",
"dig2 3 6",
"let2 own kit dig",
"let3 art zero"
]),
vec_string![
... | rust_cleaned_test_functions.jsonl/101191 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 341
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19096,
17,
368,
341,
286,
2060,
10714,
33673,
310,
12478,
486,
265,
1358,
5224,
10931,
25592,
3904,
90515,
394,
330,
44861,
16,
220,
23,
220,
16,
220,
20,
220,
16,
756,
394,
330,
1149,
16,
194... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_index() {
let mut map: TreeMap<int, int> = TreeMap::new();
map.insert(1, 2);
map.insert(2, 1);
map.insert(3, 4);
assert_eq!(map[2], 1);
} | rust_cleaned_test_functions.jsonl/88299 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 114
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3560,
368,
341,
286,
1077,
5206,
2415,
25,
76883,
4159,
11,
526,
29,
284,
76883,
486,
931,
1428,
286,
2415,
7030,
7,
16,
11,
220,
17,
317,
286,
2415,
7030,
7,
17,
11,
220,
16,
317,
286,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pool_compact1() {
let cpus = cpu_descriptor_from_socket_size(4, 6);
let mut pool = ResourcePool::new(&ResourceDescriptor::new(cpus, Vec::new()), &[]);
let rq1 = CpuRequest::Compact(4).into();
let al1 = pool.try_allocate_resources(&rq1, None).unwrap();
ass... | rust_cleaned_test_functions.jsonl/92225 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 815
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15709,
18177,
531,
16,
368,
341,
286,
1077,
12490,
355,
284,
17319,
33774,
5673,
19555,
2368,
7,
19,
11,
220,
21,
317,
286,
1077,
5206,
7314,
284,
11765,
10551,
486,
931,
2099,
4783,
11709,
486,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_options_builder() {
let mut tu_options = TUOptionsBuilder::new();
assert_eq!(tu_options.build(), CXTranslationUnit_None);
tu_options.detailed_preprocessor_record();
assert_eq!(
tu_options.build(),
CXTranslationUnit_DetailedPreprocessingReco... | rust_cleaned_test_functions.jsonl/111703 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 733
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8743,
28532,
368,
341,
286,
1077,
5206,
9765,
8743,
284,
69414,
3798,
3297,
486,
931,
543,
286,
2060,
10714,
10297,
24494,
8743,
13239,
1507,
48483,
24412,
4562,
52523,
317,
286,
9765,
8743,
950,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_boolean_array_builder() {
// Test building a boolean array with ArrayData builder and offset
let buf = Buffer::from([27_u8]);
let buf2 = buf.clone();
let data = ArrayData::builder(DataType::Boolean)
.len(5)
.offset(2)
.... | rust_cleaned_test_functions.jsonl/11603 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 337
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46642,
3858,
28532,
368,
341,
286,
442,
3393,
4752,
264,
2710,
1334,
448,
2910,
1043,
7363,
323,
4347,
8945,
286,
1077,
6607,
284,
10312,
486,
1499,
2561,
17,
22,
7300,
23,
2558,
286,
1077,
6607... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_grapheme_cursor_chunk_start_require_precontext() {
let s = "\r\n";
let mut c = GraphemeCursor::new(1, s.len(), true);
assert_eq!(c.is_boundary(&s[1..], 1), Err(GraphemeIncomplete::PreContext(1)));
c.provide_context(&s[..1], 0);
assert_eq!(c.is_boundary(&s[1..], 1), Ok(false))... | rust_cleaned_test_functions.jsonl/121017 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14738,
3894,
28601,
30539,
4906,
13793,
10442,
2147,
368,
341,
262,
1077,
274,
284,
2917,
81,
1699,
876,
262,
1077,
5206,
272,
284,
12165,
3894,
14543,
486,
931,
7,
16,
11,
274,
19406,
1507,
830... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fp2_basics() {
assert_eq!(Fp2::new(Fp::zero(), Fp::zero()), Fp2::zero());
assert_eq!(Fp2::new(Fp::one(), Fp::zero()), Fp2::one());
assert!(Fp2::zero().is_zero());
assert!(!Fp2::one().is_zero());
assert!(!Fp2::new(Fp::zero(), Fp::one(),).is_zero());
} | rust_cleaned_test_functions.jsonl/84756 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 174
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34160,
17,
880,
67981,
368,
341,
286,
2060,
10714,
10297,
37,
79,
17,
486,
931,
7832,
79,
486,
14154,
1507,
434,
79,
486,
14154,
11858,
434,
79,
17,
486,
14154,
1423,
286,
2060,
10714,
10297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_to_vec() {
let xs: Box<_> = Box::new([1, 2, 3]);
let ys = xs.to_vec();
assert_eq!(ys, [1, 2, 3]);
} | rust_cleaned_test_functions.jsonl/80830 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 76
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
13251,
368,
341,
262,
1077,
11943,
25,
8261,
32399,
29,
284,
8261,
486,
931,
2561,
16,
11,
220,
17,
11,
220,
18,
2558,
262,
1077,
31810,
284,
11943,
2389,
13251,
543,
262,
2060,
10714,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.