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_and_with_one_neq_parse() {
let name1 = _random_string(10);
let value1 = _random_string(10);
let json = format!(r#"{{"$and":[{{"~{}":{{"$neq":"{}"}}}}]}}"#, name1, value1);
let query = parse_from_json(&json).unwrap();
let expected = Operator::And(
... | rust_cleaned_test_functions.jsonl/11826 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 314
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8378,
6615,
11667,
13925,
80,
21039,
368,
341,
286,
1077,
829,
16,
284,
716,
11463,
3904,
7,
16,
15,
317,
286,
1077,
897,
16,
284,
716,
11463,
3904,
7,
16,
15,
626,
286,
1077,
2951,
284,
356... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_existing_file_too_large() {
let f = TestFixture::new();
// Create files explicitly in the past.
set_mtime_back(f.create_file("file1", 10), 10);
set_mtime_back(f.create_file("file2", 10), 5);
let c = LruDiskCache::new(f.tmp(), 15).unwrap();
assert_e... | rust_cleaned_test_functions.jsonl/6717 | {
"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,
62630,
2458,
2346,
78,
45228,
368,
341,
286,
1077,
282,
284,
3393,
18930,
486,
931,
543,
286,
442,
4230,
3542,
20975,
304,
279,
3267,
624,
286,
738,
93674,
3895,
955,
2520,
2458,
445,
1192,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let pose1 = na::Isometry3::identity();
let msg = my_msg::geometry_msgs::Pose::from(pose1);
assert_eq!(msg.position.y, 0.0);
} | rust_cleaned_test_functions.jsonl/74015 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 95
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
368,
341,
286,
1077,
17040,
16,
284,
4317,
486,
3872,
6988,
18,
486,
16912,
543,
286,
1077,
3750,
284,
847,
6483,
486,
15281,
20777,
486,
46315,
486,
1499,
1295,
960,
16,
317,
286,
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,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_blake2s_constant_constraints() {
let mut cs = TestConstraintSystem::<Fr>::new();
let rng = &mut test_rng();
let input_bits: Vec<_> = (0..512)
.map(|_| Boolean::constant(rng.next_u32() % 2 != 0))
.collect();
blake2s(&mut cs, &input_bits, b"1... | rust_cleaned_test_functions.jsonl/102743 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 201
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13141,
726,
17,
82,
34967,
60267,
368,
341,
286,
1077,
5206,
10532,
284,
3393,
17890,
2320,
27638,
22560,
6831,
931,
543,
286,
1077,
28422,
284,
609,
6984,
1273,
66849,
543,
286,
1077,
1946,
20034... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_integer() {
let ii8 = -1i8;
let ii16 = -1i16;
let ii32 = -1i32;
let ii64 = -1i64;
let iisize = -1isize;
let uu8 = 1u8;
let uu16 = 1u16;
let uu32 = 1u32;
let uu64 = 1u64;
let uusize = 1usize;
let tokens = quote! {
#ii8 #ii16 #ii32 #ii64 #iisize... | rust_cleaned_test_functions.jsonl/3595 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 273
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31725,
368,
341,
262,
1077,
14460,
23,
284,
481,
16,
72,
23,
280,
262,
1077,
14460,
16,
21,
284,
481,
16,
72,
16,
21,
280,
262,
1077,
14460,
18,
17,
284,
481,
16,
72,
18,
17,
280,
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... | 1 |
#[test]
fn test_or_as_filename() {
let status = Command::new(EXE).arg("x").arg("-a").arg("-z").arg("-o").status();
assert!(status.unwrap().matches_exit_status(1));
} | rust_cleaned_test_functions.jsonl/130941 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 79
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8734,
11898,
13323,
368,
341,
262,
1077,
2639,
284,
7348,
486,
931,
25409,
36,
568,
858,
445,
87,
1827,
858,
13645,
64,
1827,
858,
13645,
89,
1827,
858,
13645,
78,
1827,
2829,
543,
262,
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,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_test_failure_missing_path() {
let test = Patch::Test {
value: json!(123),
path: Path::new("/missing"),
};
let root = json!({
"a": {
"b": 123,
"c": 234,
},
"b": [1],
});
... | rust_cleaned_test_functions.jsonl/52521 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 239
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4452,
43618,
40447,
2638,
368,
341,
286,
1077,
1273,
284,
30412,
486,
2271,
341,
310,
897,
25,
2951,
10297,
16,
17,
18,
1326,
310,
1815,
25,
7933,
486,
931,
4283,
30616,
4461,
286,
3634,
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_outi() {
let (mut cpu, mut bus) = new_cpu(vec![0xed, 0xa3]);
cpu.registers.b = 0x10;
cpu.registers.c = 0x07;
cpu.registers.d = 0x5a;
cpu.registers.h = 0x10;
cpu.registers.l = 0x00;
bus.memory_write(0x1000, 0x59);
cpu.step(&mut bu... | rust_cleaned_test_functions.jsonl/112667 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 332
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6068,
72,
368,
341,
286,
1077,
320,
6984,
17319,
11,
5206,
5828,
8,
284,
501,
21795,
25592,
20703,
15,
51319,
11,
220,
15,
9591,
18,
10149,
286,
17319,
7031,
9303,
948,
284,
220,
15,
87,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_entry_or_insert() {
let mut map = TypeMap::new();
map.entry::<KeyType>().or_insert(Value(20)).0 += 1;
assert_eq!(map.get::<KeyType>().unwrap(), &Value(21));
// on existing value
map.entry::<KeyType>().or_insert(Value(100)).0 += 1;
assert_eq!(map.g... | rust_cleaned_test_functions.jsonl/33445 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 173
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9078,
8734,
17678,
368,
341,
286,
1077,
5206,
2415,
284,
3990,
2227,
486,
931,
543,
286,
2415,
24116,
27638,
97964,
10483,
269,
17678,
25346,
7,
17,
15,
4579,
15,
1421,
220,
16,
280,
286,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_is_ascending_buffer(){
unsafe {
let v = vec!(1i32, 2, 3, 4);
assert!(is_ascending_buffer(v.as_ptr(), v.len()));
let v = vec!(1i32);
assert!(is_ascending_buffer(v.as_ptr(), v.len()));
let v : Vec<i32> = vec!();
assert... | rust_cleaned_test_functions.jsonl/133543 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 456
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
62,
71900,
7776,
3032,
286,
19860,
341,
310,
1077,
348,
284,
7486,
10297,
16,
72,
18,
17,
11,
220,
17,
11,
220,
18,
11,
220,
19,
317,
310,
2060,
10297,
285,
62,
71900,
7776,
3747,
5357... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_pop() {
let mut m = VecDequeMap::new();
m.push_back(3);
assert_eq!(m[0], 3);
assert_eq!(m.start_index(), 0);
assert_eq!(m.push_index(), 1);
m.push_back(7);
assert_eq!(m[0], 3);
assert_eq!(m[1], 7);
assert_eq!(m.start_index()... | rust_cleaned_test_functions.jsonl/51622 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 801
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17061,
368,
341,
286,
1077,
5206,
296,
284,
11312,
73891,
2227,
486,
931,
543,
286,
296,
2552,
3895,
7,
18,
317,
286,
2060,
10714,
10297,
76,
58,
15,
1125,
220,
18,
317,
286,
2060,
10714,
1029... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_open_multiple_channels_establishes_channels_after_acknowledgement() {
let mut exec = fasync::Executor::new().unwrap();
// Crete and start a SessionInner that relays any opened RFCOMM channels.
let (mut session, mut outgoing_frames, _channel_receiver) = setup_session();
... | rust_cleaned_test_functions.jsonl/14939 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1278
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11311,
45233,
19291,
18583,
5102,
288,
19291,
19844,
48447,
50022,
29564,
368,
341,
286,
1077,
5206,
3883,
284,
282,
7692,
486,
25255,
486,
931,
1005,
15454,
1428,
286,
442,
7792,
665,
323,
1191,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_hex_valid_into_message() {
let keypair = gen_keypair();
let msg = TxSimple::new(&keypair.0, "I am a simple!", &keypair.1);
let hex = msg.to_hex();
let msg2 = TxSimple::from_hex(hex).expect("Unable to decode hex into `TxFirst`");
assert_eq!(msg2, msg);
} | rust_cleaned_test_functions.jsonl/90748 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32655,
8337,
45514,
6462,
368,
341,
262,
1077,
1376,
12670,
284,
4081,
3097,
12670,
543,
262,
1077,
3750,
284,
39850,
16374,
486,
931,
2099,
792,
12670,
13,
15,
11,
330,
40,
1079,
264,
4285,
187... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_union() {
let mut model = Model::default();
let g_ids = (0..=2)
.map(|id| {
let g_id = model.make_box(qgm::get(id).into());
let mut b = model.get_mut_box(g_id);
b.add_column(exp::base(0, typ::int32(false)));
... | rust_cleaned_test_functions.jsonl/6657 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1196
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51621,
368,
341,
286,
1077,
5206,
1614,
284,
4903,
486,
2258,
1428,
286,
1077,
342,
8077,
284,
320,
15,
496,
28,
17,
340,
310,
659,
2186,
22428,
307,
91,
341,
394,
1077,
342,
842,
284,
1614,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bytes_mut() {
let b = BytesMut::from("test");
assert_eq!(Binary::from(b.clone()).len(), 4);
assert_eq!(Binary::from(b).as_ref(), b"test");
} | rust_cleaned_test_functions.jsonl/89003 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 98
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12524,
29523,
368,
341,
286,
1077,
293,
284,
30024,
51440,
486,
1499,
445,
1944,
797,
286,
2060,
10714,
10297,
21338,
486,
1499,
1883,
15997,
6011,
2892,
1507,
220,
19,
317,
286,
2060,
10714,
1029... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ptr_eq() {
let five = Arc::new(5);
let same_five = five.clone();
let other_five = Arc::new(5);
assert!(Arc::ptr_eq(&five, &same_five));
assert!(!Arc::ptr_eq(&five, &other_five));
} | rust_cleaned_test_functions.jsonl/35123 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 126
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4348,
10714,
368,
341,
286,
1077,
4236,
284,
19689,
486,
931,
7,
20,
317,
286,
1077,
1852,
95258,
284,
4236,
15997,
543,
286,
1077,
1008,
95258,
284,
19689,
486,
931,
7,
20,
626,
286,
2060,
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_crds_filter_mask() {
let filter = CrdsFilter::new_rand(1, 128);
assert_eq!(filter.mask, !0x0);
assert_eq!(CrdsFilter::max_items(80f64, 0.01, 8f64), 9f64);
assert_eq!(CrdsFilter::mask_bits(1000f64, 9f64), 7u32);
let filter = CrdsFilter::new_rand(10... | rust_cleaned_test_functions.jsonl/45203 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 210
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32331,
5356,
8727,
9999,
368,
341,
286,
1077,
4051,
284,
4553,
5356,
5632,
486,
931,
33864,
7,
16,
11,
220,
16,
17,
23,
317,
286,
2060,
10714,
10297,
5315,
35179,
11,
753,
15,
87,
15,
317,
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_ask_era_num() {
new_test_ext().execute_with(|| {
advance_session();
assert_eq!(<frame_system::Pallet<Test>>::block_number(), 5 );
assert_eq!(Session::current_index(), 1 );
assert_eq!(OracleFinance::current_era(), Some(0));
assert_eq!(OracleFinance::eras_start_session_index(0), Some(2)... | rust_cleaned_test_functions.jsonl/35133 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 712
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
92269,
62,
2416,
4273,
368,
341,
8638,
4452,
9927,
1005,
10257,
6615,
79453,
341,
197,
197,
59320,
12316,
543,
197,
6948,
10714,
10297,
27,
6763,
17687,
486,
47,
7464,
71273,
77595,
4574,
5500,
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_next_orientation() {
assert_eq!(Orientation::East, next_orientation(Orientation::North, 'R'));
assert_eq!(Orientation::West, next_orientation(Orientation::North, 'L'));
assert_eq!(Orientation::South, next_orientation(Orientation::East, 'R'));
assert_eq!(Orientation::North, next_orientation(O... | rust_cleaned_test_functions.jsonl/11945 | {
"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,
11257,
66269,
368,
341,
6948,
10714,
10297,
22332,
486,
36340,
11,
1790,
66269,
19238,
17663,
486,
25221,
11,
364,
49,
6336,
6948,
10714,
10297,
22332,
486,
23306,
11,
1790,
66269,
19238,
17663,
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_binary_array() {
let values: [u8; 12] = [
b'h', b'e', b'l', b'l', b'o', b'p', b'a', b'r', b'q', b'u', b'e', b't',
];
let offsets: [i32; 4] = [0, 5, 5, 12];
let array_data = ArrayData::builder(DataType::Binary)
.len(3)
... | rust_cleaned_test_functions.jsonl/11616 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 954
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31761,
3858,
368,
341,
286,
1077,
2750,
25,
508,
84,
23,
26,
220,
16,
17,
60,
284,
2278,
310,
293,
38882,
516,
293,
47868,
516,
293,
63866,
516,
293,
63866,
516,
293,
93472,
516,
293,
6,
79,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_rchunks_mut_nth() {
let v: &mut [i32] = &mut [0, 1, 2, 3, 4, 5];
let mut c = v.rchunks_mut(2);
assert_eq!(c.nth(1).unwrap(), &[2, 3]);
assert_eq!(c.next().unwrap(), &[0, 1]);
let v2: &mut [i32] = &mut [0, 1, 2, 3, 4];
let mut c2 = v2.rchunks_mut(3);
assert_eq!(c2.nth... | rust_cleaned_test_functions.jsonl/9668 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 210
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
84263,
29523,
78342,
368,
341,
262,
1077,
348,
25,
609,
6984,
508,
72,
18,
17,
60,
284,
609,
6984,
508,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_eq() {
let mut a = VecMap::new();
let mut b = VecMap::new();
assert!(a == b);
assert!(a.insert(0, 5).is_none());
assert!(a != b);
assert!(b.insert(0, 4).is_none());
assert!(a != b);
assert!(a.insert(5, 19).is_none());
asser... | rust_cleaned_test_functions.jsonl/53278 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 311
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10714,
368,
341,
286,
1077,
5206,
264,
284,
11312,
2227,
486,
931,
543,
286,
1077,
5206,
293,
284,
11312,
2227,
486,
931,
1428,
286,
2060,
10297,
64,
621,
293,
317,
286,
2060,
10297,
64,
7030,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_whitespace_control() {
assert_eq!(
split_blocks("foo {{ bar }} 2000"),
vec!["foo ", "{{ bar }}", " 2000"]
);
assert_eq!(
split_blocks("foo {{- bar -}} 2000"),
vec!["foo", " {{- bar -}} ", "2000"]
);
assert_eq... | rust_cleaned_test_functions.jsonl/65644 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 467
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86175,
13436,
368,
341,
286,
2060,
10714,
33673,
310,
6718,
25201,
445,
7975,
5867,
3619,
3869,
220,
17,
15,
15,
15,
4461,
310,
7486,
0,
1183,
7975,
3670,
47219,
3619,
3869,
497,
330,
220,
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_incompatible_pairwise_cipher() {
let a_rsne = make_rsne(Some(cipher::CCMP_128), vec![cipher::BIP_CMAC_256], vec![akm::PSK]);
assert_eq!(is_rsn_compatible(&a_rsne), false);
} | rust_cleaned_test_functions.jsonl/113747 | {
"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,
1243,
34842,
14445,
4482,
76692,
368,
341,
286,
1077,
264,
47115,
811,
284,
1281,
47115,
811,
65405,
1337,
10558,
486,
3706,
5781,
62,
16,
17,
23,
701,
7486,
20703,
67586,
486,
33,
3298,
920,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_compute_strong_bridges() {
#![allow(clippy::many_single_char_names)]
let mut graph = petgraph_impl::new::<_, ()>();
let a = graph.add_node("a");
let b = graph.add_node("b");
let c = graph.add_node("c");
let d = graph.add_node("d");
let e = ... | rust_cleaned_test_functions.jsonl/115490 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 829
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57028,
2895,
644,
880,
1869,
4188,
368,
341,
286,
671,
20703,
7183,
9849,
45749,
486,
34576,
19487,
9232,
9187,
5563,
286,
1077,
5206,
4771,
284,
6753,
4439,
21007,
486,
931,
27638,
6878,
1719,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_find_acc() {
let test_data = [
"nop +0", "acc +1", "jmp +4", "acc +3", "jmp -3", "acc -99", "acc +1", "jmp -4",
"acc +6",
];
let mut program = parse_instructions(test_data);
let res = execute(0, 0, &program);
if let Execution::InfL... | rust_cleaned_test_functions.jsonl/10241 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 271
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
17737,
368,
341,
286,
1077,
1273,
1769,
284,
2278,
310,
330,
62813,
488,
15,
497,
330,
4475,
488,
16,
497,
330,
61055,
488,
19,
497,
330,
4475,
488,
18,
497,
330,
61055,
481,
18,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_second() {
assert_eq!(second("seconds"), Ok(("", "seconds")));
assert_eq!(second("second"), Ok(("", "second")));
assert_eq!(second("secs"), Ok(("", "secs")));
assert_eq!(second("sec"), Ok(("", "sec")));
assert_eq!(second("s"), Ok(("", "... | rust_cleaned_test_functions.jsonl/71145 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 173
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29644,
368,
341,
310,
2060,
10714,
10297,
5569,
445,
17403,
3975,
7622,
7,
19814,
330,
17403,
17621,
310,
2060,
10714,
10297,
5569,
445,
5569,
3975,
7622,
7,
19814,
330,
5569,
17621,
310,
2060,
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_parse_attribute_ref_sup4() {
let buf = [0x01, 0x02, 0x03, 0x04, 0x99, 0x99];
let unit = test_parse_attribute_unit_default();
let form = constants::DW_FORM_ref_sup4;
let value = AttributeValue::DebugInfoRefSup(DebugInfoOffset(0x0403_0201));
test_parse_attri... | rust_cleaned_test_functions.jsonl/102032 | {
"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,
16791,
7793,
23723,
19,
368,
341,
286,
1077,
6607,
284,
508,
15,
87,
15,
16,
11,
220,
15,
87,
15,
17,
11,
220,
15,
87,
15,
18,
11,
220,
15,
87,
15,
19,
11,
220,
15,
87,
24,
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_network_big_message() {
let first = "127.0.0.1:17200".parse().unwrap();
let second = "127.0.0.1:17201".parse().unwrap();
let m1 = raw_message(100_000);
let m2 = raw_message(400);
let mut connect_list = ConnectList::default();
let mut t1 = ConnectionParams::from_address... | rust_cleaned_test_functions.jsonl/46392 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 715
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20966,
36386,
6462,
368,
341,
262,
1077,
1156,
284,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
16,
22,
17,
15,
15,
3263,
6400,
1005,
15454,
543,
262,
1077,
2086,
284,
330,
16,
17,
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_format_plugin_output_from_template_with_each_loop() {
let mapping = Mapping {
name: "random name".to_string(),
query: "up{random_label=\"random_value\"}".to_string(),
thresholds: ThresholdPair {
warning: None,
critical: ... | rust_cleaned_test_functions.jsonl/96139 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1648
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8955,
23110,
7645,
5673,
8693,
6615,
32046,
17198,
368,
341,
286,
1077,
12731,
284,
38446,
341,
310,
829,
25,
330,
11463,
829,
3263,
983,
3904,
3148,
310,
3239,
25,
330,
454,
90,
11463,
6106,
40... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_hsl_rgb_conversion() {
let red_rgb = RGBColor {
r: 1.,
g: 0.,
b: 0.,
};
let red_hsv: HSVColor = red_rgb.convert();
assert!(red_hsv.h.abs() <= 0.0001);
assert!((red_hsv.s - 1.0) <= 0.0001);
assert!((red_hsv.v - 1.... | rust_cleaned_test_functions.jsonl/40396 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 348
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1523,
3226,
37407,
64132,
368,
341,
286,
1077,
2518,
37407,
284,
20978,
1636,
341,
310,
435,
25,
220,
16,
38088,
310,
342,
25,
220,
15,
38088,
310,
293,
25,
220,
15,
38088,
286,
2605,
286,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let json_str = "{\"name\":\"Alan\", \"city\":\"Tokyo\"}";
let contact: Contact = json::decode(json_str).unwrap();
assert!(contact == Contact { name: "Alan".to_string(), city: "Tokyo".to_string() });
} | rust_cleaned_test_functions.jsonl/92811 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 97
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
368,
341,
262,
1077,
2951,
2895,
284,
54734,
606,
23488,
67624,
16215,
7245,
8926,
23488,
52854,
16032,
2105,
26259,
262,
1077,
3645,
25,
9180,
284,
2951,
486,
18196,
9304,
2895,
568,
15454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_get_rsna_invalid_psk() {
let bss = fake_bss!(Wpa2);
// PSK too short
let credential = fidl_sme::Credential::Psk(vec![0xAA; 31]);
get_wpa2_rsna(&fake_device_info(CLIENT_ADDR), &credential, &bss)
.expect_err("expected RSNA failure with invalid PSK");
... | rust_cleaned_test_functions.jsonl/6069 | {
"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,
3062,
47115,
3376,
31433,
620,
4886,
368,
341,
286,
1077,
293,
778,
284,
12418,
880,
778,
10297,
54,
6595,
17,
317,
286,
442,
11405,
42,
2238,
2805,
198,
286,
1077,
40207,
284,
32104,
75,
643,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_thread_signal_unblock() {
thread::spawn(|| {
let mut mask = SigSet::empty();
mask.add(SIGUSR1);
assert!(mask.thread_unblock().is_ok());
assert!(!SigSet::thread_get_mask().unwrap().contains(SIGUSR1));
}).join().unwrap();
} | rust_cleaned_test_functions.jsonl/41967 | {
"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,
10814,
21137,
4907,
4574,
368,
341,
286,
4516,
486,
46087,
79453,
341,
310,
1077,
5206,
6911,
284,
41560,
1649,
486,
3194,
543,
310,
6911,
1364,
52516,
49558,
16,
626,
310,
2060,
10297,
11258,
452... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_template_element_no_expressions() {
assert_parse_success!(
primary_expression(false, false),
"`asd`",
Expression::TemplateLiteral {
quasis: vec![TemplateElement {
cooked: Some("asd".to_string()),
raw: "asd".to_string(),
... | rust_cleaned_test_functions.jsonl/66464 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 263
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8693,
7894,
6536,
2702,
39873,
368,
341,
262,
2060,
21039,
18632,
33673,
286,
6028,
28068,
3576,
11,
895,
1326,
286,
35973,
79102,
63,
756,
286,
16378,
486,
7275,
17350,
341,
310,
922,
10718,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_hmac_sha256_examples() {
assert_eq!(
hmac_256::<Sha256>(&[], &[]),
hex::decode("b613679a0814d9ec772f95d778c35fc5ff1697c493715653c6c712144292c5ad")
.unwrap()
.as_slice()
);
assert_eq!(
hmac_256::<Sha256>(b... | rust_cleaned_test_functions.jsonl/46487 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 330
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1523,
11948,
48836,
17,
20,
21,
45279,
368,
341,
286,
2060,
10714,
33673,
310,
83356,
62,
17,
20,
21,
27638,
62316,
17,
20,
21,
44784,
12995,
609,
1294,
1326,
310,
12371,
486,
18196,
445,
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... | 1 |
#[test]
fn test_block_reconciliation() {
let mut dummy_chain = DummyChainImpl::new();
let head_header = block::BlockHeader {
height: 1,
..block::BlockHeader::default()
};
dummy_chain.store_head_header(&head_header);
let new_output = DummyOutputSet::empty()
.with_output(test_output(10))
.w... | rust_cleaned_test_functions.jsonl/17040 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1765
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7113,
1288,
98240,
368,
341,
197,
10217,
5206,
17292,
30583,
284,
50567,
18837,
9673,
486,
931,
543,
197,
10217,
1968,
8757,
284,
2504,
486,
4713,
4047,
341,
298,
30500,
25,
220,
16,
345,
298,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_svd() {
// Y = beta.X + e
// where Y is the N x 1 matrix of y values
// and X is the N x 2 matrix of x0 and x1 values
// x0 = 1 for all datapoints
// the expansion form is y = beta0 * x0 + beta1 * x1 + e
let xs = m!(1.0, 1.0; 1.0, 2.0; 1.0, 3.0);
... | rust_cleaned_test_functions.jsonl/61502 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 626
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
16598,
368,
341,
286,
442,
809,
284,
13440,
4338,
488,
384,
198,
286,
442,
1380,
809,
374,
279,
451,
856,
220,
16,
6172,
315,
379,
2750,
198,
286,
442,
323,
1599,
374,
279,
451,
856,
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_reduce_dollar_to_franc() {
let bank = default_bank();
assert_eq!(franc(20.0), bank.reduce(&dollar(10.0), "CHF"));
} | rust_cleaned_test_functions.jsonl/133362 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 81
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64596,
814,
21295,
2346,
41537,
1129,
368,
341,
286,
1077,
6073,
284,
1638,
35733,
543,
286,
2060,
10714,
10297,
1626,
1129,
7,
17,
15,
13,
15,
701,
6073,
23792,
2099,
67,
21295,
7,
16,
15,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_part_1() {
let data = vec![
"0: 4 1 5",
"1: 2 3 | 3 2",
"2: 4 4 | 5 5",
"3: 4 5 | 5 4",
"4: \"a\"",
"5: \"b\"",
"",
"ababbb",
"bababa",
"abbbab",
"aaabbb",
"aaaabbb",
];
assert_eq!(part_1(&data), 2);
} | rust_cleaned_test_functions.jsonl/50116 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 201
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10495,
62,
16,
368,
341,
262,
1077,
821,
284,
7486,
90515,
414,
330,
15,
25,
220,
19,
220,
16,
220,
20,
756,
414,
330,
16,
25,
220,
17,
220,
18,
760,
220,
18,
220,
17,
756,
414,
330,
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_query_matches_with_alternatives_at_root() {
allocations::record(|| {
let language = get_language("javascript");
let query = Query::new(
language,
r#"
[
"if"
"else"
"function"
"... | rust_cleaned_test_functions.jsonl/25169 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 660
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
38344,
6615,
79728,
5859,
3752,
12993,
368,
341,
262,
69642,
486,
8548,
79453,
341,
286,
1077,
4128,
284,
633,
29021,
445,
14073,
797,
286,
1077,
3239,
284,
11361,
486,
931,
1006,
310,
4128,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_loops_around_when_reaching_top_of_the_list() {
let search = get_blank_search();
assert!(search.up().up().selection().unwrap().as_slice() == "two");
} | rust_cleaned_test_functions.jsonl/96102 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 84
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5560,
3721,
62,
19454,
47636,
1288,
11829,
10426,
3575,
16068,
2019,
368,
341,
286,
1077,
2711,
284,
633,
56103,
10716,
543,
286,
2060,
10297,
1836,
17652,
1005,
454,
1005,
23617,
1005,
15454,
1005,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_array_sum() {
let c: Result<Color, _> = [-1, 255, 255].try_into();
assert!(c.is_err());
} | rust_cleaned_test_functions.jsonl/24502 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 70
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
10160,
368,
341,
286,
1077,
272,
25,
5714,
88827,
11,
716,
29,
284,
10055,
16,
11,
220,
17,
20,
20,
11,
220,
17,
20,
20,
936,
1539,
45514,
543,
286,
2060,
10297,
66,
2079,
9266,
1423,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_buffer_len() {
assert_eq!(mock_buffer::<u8>(8).len(), 8);
assert_eq!(mock_buffer::<u16>(8).len(), 8);
} | rust_cleaned_test_functions.jsonl/30872 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 69
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7776,
6043,
368,
341,
262,
2060,
10714,
10297,
16712,
7776,
27638,
84,
23,
2235,
23,
568,
2892,
1507,
220,
23,
317,
262,
2060,
10714,
10297,
16712,
7776,
27638,
84,
16,
21,
2235,
23,
568,
2892,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_decrement_5() {
let mut h = Histogram::new();
let v = h.config.max_value + 1;
let _ = h.increment(v);
h.decrement(v).unwrap();
} | rust_cleaned_test_functions.jsonl/82147 | {
"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,
2259,
13477,
62,
20,
368,
341,
286,
1077,
5206,
305,
284,
82138,
486,
931,
543,
286,
1077,
348,
284,
305,
5423,
6678,
3142,
488,
220,
16,
280,
286,
1077,
716,
284,
305,
56936,
3747,
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 |
#[test]
fn test_match_user_non_root() -> Result<(), Box<dyn error::Error>> {
let image = build_image(&[
"RUN addgroup --gid 1234 app",
"RUN adduser --uid 1234 --gid 1234 --gecos '' --disabled-password app",
])?;
let output = run_container(
&image,
&["-e", "MHF_HOST_UI... | rust_cleaned_test_functions.jsonl/90917 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 279
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10708,
3317,
21637,
12993,
368,
1464,
5714,
68843,
8261,
92846,
1465,
486,
1454,
2452,
341,
262,
1077,
2168,
284,
1936,
4954,
2099,
9640,
286,
330,
47390,
912,
4074,
1177,
34849,
220,
16,
17,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_parse_error_at_index_error() {
test_parse_error!(
vec![("a", "false"), ("b", "true")],
(bool, u32),
ErrorKind::ParseErrorAtIndex {
index: 1,
value: "true".to_owned(),
expected_type: "u32",
}
... | rust_cleaned_test_functions.jsonl/16608 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 203
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
4096,
3752,
3560,
4096,
368,
341,
286,
1273,
21039,
4096,
33673,
310,
7486,
20703,
445,
64,
497,
330,
3849,
3975,
3489,
65,
497,
330,
1866,
899,
1259,
310,
320,
2641,
11,
575,
18,
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... | 1 |
#[test]
fn test_json_as_duration() {
test_none_with_ctx_and_extra(cast_json_as_duration);
// the case that Json::unquote failed had be tested by test_json_unquote
let cs = vec![
Json::Object(BTreeMap::default()),
Json::Array(vec![]),
Json::I64(10),
... | rust_cleaned_test_functions.jsonl/101811 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1108
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
11898,
25454,
368,
341,
286,
1273,
31488,
6615,
15147,
8378,
31858,
1337,
559,
9455,
11898,
25454,
626,
286,
442,
279,
1142,
429,
8308,
486,
359,
2949,
4641,
1030,
387,
12510,
553,
1273,
945... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_array_iter() {
use std::convert::TryFrom;
let arr = params::Container::try_from(vec![0i32.into(), 1i32.into(), 2i32.into()]).unwrap();
let mut fds = Vec::new();
let mut buf = Vec::new();
let mut ctx = crate::wire::marshal::MarshalContext {
fds: &mut fds,
buf:... | rust_cleaned_test_functions.jsonl/71898 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 400
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
11723,
368,
341,
262,
990,
1460,
486,
14166,
486,
21453,
3830,
280,
262,
1077,
2890,
284,
3628,
486,
4502,
486,
1539,
5673,
25592,
20703,
15,
72,
18,
17,
39860,
1507,
220,
16,
72,
18,
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... | 3 |
#[test]
fn test_refresh_neuron_by_subaccount_by_proxy() {
let owner = *TEST_NEURON_1_OWNER_PRINCIPAL;
let caller = *TEST_NEURON_1_OWNER_PRINCIPAL;
refresh_neuron_by_id_or_subaccount(owner, caller, RefreshBy::Subaccount);
} | rust_cleaned_test_functions.jsonl/1155 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 110
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42076,
13925,
36090,
3710,
5228,
4608,
3710,
29712,
368,
341,
262,
1077,
6372,
284,
353,
10033,
14039,
1511,
711,
62,
16,
74323,
10571,
38439,
3298,
969,
280,
262,
1077,
19865,
284,
353,
10033,
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_seek_do_not_overwrite() {
let (at, mut ucmd) = at_and_ucmd!();
let mut outfile = at.make_file("outfile");
outfile.write_all(b"abc").unwrap();
ucmd.args(&[
"bs=1",
"skip=1",
"seek=1",
"count=1",
"status=noxfer",
"of=outfile... | rust_cleaned_test_functions.jsonl/99840 | {
"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,
74473,
26309,
7913,
15431,
4934,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
1077,
5206,
33178,
284,
518,
10117,
2458,
445,
59625,
797,
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_setup_and_prove_single_gate_and_tables() {
use crate::pairing::bn256::{Bn256, Fr};
use crate::worker::Worker;
use crate::plonk::better_better_cs::verifier::*;
use crate::plonk::better_better_cs::setup::VerificationKey;
let mut assembly = SetupAssembly::<B... | rust_cleaned_test_functions.jsonl/78087 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 853
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21363,
8378,
2540,
586,
19487,
54798,
8378,
35632,
368,
341,
286,
990,
17717,
486,
12670,
287,
486,
11081,
17,
20,
21,
22964,
33,
77,
17,
20,
21,
11,
2869,
2440,
286,
990,
17717,
486,
21462,
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... | 1 |
#[test]
fn test_read_byte_array_len_encoding() -> io::Result<()> {
let data = [
4, // byte array len encoding ID
6, // args.len
1, // external encoding ID
1, // args.len
13, // block content ID
1, // external encoding ID
... | rust_cleaned_test_functions.jsonl/5075 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 381
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
19737,
3858,
6043,
37613,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
821,
284,
2278,
310,
220,
19,
11,
220,
442,
4922,
1334,
2422,
11170,
3034,
198,
310,
220,
21,
11,
220,
442,
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... | 2 |
#[test]
fn test_into_alogithm_id() {
assert_eq!(
Into::<TPM2_ALG_ID>::into(AlgorithmicError::Error),
TPM2_ALG_ERROR
);
} | rust_cleaned_test_functions.jsonl/41517 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45514,
8418,
538,
410,
76,
842,
368,
341,
286,
2060,
10714,
33673,
310,
31645,
27638,
4239,
44,
17,
8912,
38,
3450,
6831,
18122,
7,
27847,
292,
1454,
486,
1454,
1326,
310,
63644,
17,
8912,
38,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_keys() {
let vec = vec![(1, 'a'), (2, 'b'), (3, 'c')];
let map: HashMap<_, _> = vec.into_par_iter().collect();
let keys: Vec<_> = map.par_keys().cloned().collect();
assert_eq!(keys.len(), 3);
assert!(keys.contains(&1));
assert!(keys.contains(&2));
... | rust_cleaned_test_functions.jsonl/45214 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 183
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12631,
368,
341,
286,
1077,
7486,
284,
7486,
0,
9697,
16,
11,
364,
64,
4567,
320,
17,
11,
364,
65,
4567,
320,
18,
11,
364,
66,
863,
935,
286,
1077,
2415,
25,
10528,
27,
6878,
716,
29,
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_inject_input_sends_action() {
async_service_test(|ime_service, _visibility_service| {
async move {
let (_ime, mut editor_stream) = bind_ime_for_test(&ime_service);
// send key events
simulate_keypress(&ime_service, 0, HID_USAGE... | rust_cleaned_test_functions.jsonl/7402 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 674
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
583,
5898,
643,
1412,
7931,
368,
341,
286,
3312,
12267,
4452,
22428,
545,
12267,
11,
716,
28176,
12267,
91,
341,
310,
3312,
3271,
341,
394,
1077,
5453,
545,
11,
5206,
6440,
12673,
8,
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... | 2 |
#[test]
fn test_create_list_table_patient_no_header() {
test_list_table_patient(
PATIENTS_LIST_HEADER,
PATIENTS_LIST_DICOM_TAGS,
true,
include_str!("../tests/data/unit/list_patients_no_header").trim_end(),
);
} | rust_cleaned_test_functions.jsonl/76474 | {
"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,
8657,
2019,
5237,
70310,
6536,
8757,
368,
341,
286,
1273,
2019,
5237,
70310,
1006,
310,
44370,
10757,
50,
11899,
20330,
345,
310,
44370,
10757,
50,
11899,
1557,
1317,
1898,
84182,
345,
310,
830,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_nested_hierarchy() {
let result = hierarchy! {
root: {
sub1: {
sub11: {
sub111: {
value: 1u64,
other_value: "foo",
}
... | rust_cleaned_test_functions.jsonl/45833 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 732
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66279,
95043,
368,
341,
286,
1077,
1102,
284,
28922,
0,
341,
310,
3704,
25,
341,
394,
1186,
16,
25,
341,
503,
1186,
16,
16,
25,
341,
664,
1186,
16,
16,
16,
25,
341,
999,
897,
25,
220,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_legal_moves_banmen_with_kyou_nari_7_squares_sente() {
test_legal_moves_banmen_with_kin_7_squares_sente_impl(SKyouN)
} | rust_cleaned_test_functions.jsonl/81273 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 73
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82324,
45390,
880,
276,
5676,
6615,
4698,
9330,
1089,
2780,
62,
22,
643,
40856,
643,
6817,
368,
972,
18185,
82324,
45390,
880,
276,
5676,
6615,
4698,
258,
62,
22,
643,
40856,
643,
6817,
21007,
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 |
#[test]
fn test_toolchain_sort() {
let expected = vec![
"stable-x86_64-unknown-linux-gnu",
"beta-x86_64-unknown-linux-gnu",
"nightly-x86_64-unknown-linux-gnu",
"1.0.0-x86_64-unknown-linux-gnu",
"1.2.0-x86_64-unknown-linux-gnu",
"1.8... | rust_cleaned_test_functions.jsonl/15086 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 503
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22785,
8819,
18435,
368,
341,
286,
1077,
3601,
284,
7486,
90515,
310,
330,
27992,
6558,
23,
21,
62,
21,
19,
12,
16088,
46375,
85716,
756,
310,
330,
19127,
6558,
23,
21,
62,
21,
19,
12,
16088,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_var_f64_le() {
for &v in F64_TESTS {
let mut buf = vec![];
buf.encode_f64_le(v).unwrap();
let value = decode_f64_le(&mut buf.as_slice()).unwrap();
assert_eq!(v, value);
}
} | rust_cleaned_test_functions.jsonl/45059 | {
"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,
4612,
761,
21,
19,
11751,
368,
341,
286,
369,
609,
85,
304,
434,
21,
19,
80312,
341,
310,
1077,
5206,
6607,
284,
7486,
0,
15078,
310,
6607,
17313,
761,
21,
19,
11751,
3747,
568,
15454,
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... | 2 |
#[test]
fn test_enum_as_int() {
// TODO: we need to test None case here.
let mut buf = BufferVec::new();
buf.push("我好强啊");
buf.push("我太强啦");
let cs = vec![
// (input, expect)
(EnumRef::new(&buf, 0), 0),
(EnumRef::new(&buf, 1), 1),
... | rust_cleaned_test_functions.jsonl/1940 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 342
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31054,
11898,
4042,
368,
341,
286,
442,
5343,
25,
582,
1184,
311,
1273,
2240,
1142,
1588,
382,
286,
1077,
5206,
6607,
284,
10312,
10050,
486,
931,
543,
286,
6607,
2552,
445,
35946,
52801,
99193,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_sqrt() {
let mut ctx = create_context();
ctx.register_scalar_function(Rc::new(SqrtFunction {}));
let df = ctx.sql(&"SELECT id, sqrt(id) FROM people").unwrap();
ctx.write_csv(df, "./target/test_sqrt.csv").unwrap();
let expected_result = read_file("test/... | rust_cleaned_test_functions.jsonl/2506 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 195
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
92199,
368,
341,
286,
1077,
5206,
5635,
284,
1855,
8467,
1428,
286,
5635,
9929,
41652,
9174,
2785,
66,
486,
931,
3759,
8140,
5152,
4687,
3237,
286,
1077,
6764,
284,
5635,
10045,
2099,
1,
4858,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_zero_checksum() {
let mut bytes = vec![0; 8];
let mut packet = Packet::new_unchecked(&mut bytes);
packet.set_src_port(1);
packet.set_dst_port(31881);
packet.set_len(8);
packet.fill_checksum(&SRC_ADDR.into(), &DST_ADDR.into());
assert_eq!(pa... | rust_cleaned_test_functions.jsonl/36418 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 176
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19359,
64038,
368,
341,
286,
1077,
5206,
5820,
284,
7486,
20703,
15,
26,
220,
23,
935,
286,
1077,
5206,
10151,
284,
28889,
486,
931,
4907,
7549,
2099,
6984,
5820,
317,
286,
10151,
980,
16274,
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... | 1 |
#[test]
fn test_segment_count_collector() {
{
let count_collector = SegmentCountCollector::default();
assert_eq!(count_collector.harvest(), 0);
}
{
let mut count_collector = SegmentCountCollector::default();
count_collector.collect(0u32, 1.... | rust_cleaned_test_functions.jsonl/70337 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 423
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28061,
3180,
10211,
27669,
368,
341,
286,
341,
310,
1077,
1760,
10211,
27669,
284,
37103,
2507,
53694,
486,
2258,
543,
310,
2060,
10714,
10297,
1830,
10211,
27669,
86455,
7019,
1507,
220,
15,
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_textobject_paragraph_inside_double() {
let tests = [
(
"last two\n\n#[p|]#aragraph\n\nwithout whitespaces\n\n",
"last two\n\n#[paragraph\n\nwithout whitespaces\n|]#\n",
),
(
"last two\n#[\n|]#paragraph\n\... | rust_cleaned_test_functions.jsonl/107627 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 464
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4326,
1700,
96713,
72860,
24598,
368,
341,
286,
1077,
7032,
284,
2278,
310,
2399,
394,
330,
4259,
1378,
1699,
1699,
13353,
79,
91,
60,
2,
277,
9216,
1699,
1699,
28996,
21874,
27338,
1699,
1699,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_and() {
assert_eq!(1, and (1,1));
assert_eq!(0, and (0,1));
assert_eq!(0, and (1,0));
assert_eq!(0, and (0,0));
} | rust_cleaned_test_functions.jsonl/112906 | {
"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,
8378,
368,
341,
286,
2060,
10714,
10297,
16,
11,
323,
320,
16,
11,
16,
1106,
286,
2060,
10714,
10297,
15,
11,
323,
320,
15,
11,
16,
1106,
286,
2060,
10714,
10297,
15,
11,
323,
320,
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 |
#[test]
fn test_range_128() {
use core::{i128, u128};
assert!(super::range(0i128, 5).eq([0, 1, 2, 3, 4].iter().cloned()));
assert!(super::range(-10i128, -1).eq([-10, -9, -8, -7, -6, -5, -4, -3, -2].iter().cloned()));
assert!(super::range(0u128, 5)
.rev()
... | rust_cleaned_test_functions.jsonl/37393 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 690
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9698,
62,
16,
17,
23,
368,
341,
286,
990,
6200,
22964,
72,
16,
17,
23,
11,
575,
16,
17,
23,
2315,
286,
2060,
10297,
9522,
486,
9669,
7,
15,
72,
16,
17,
23,
11,
220,
20,
568,
11006,
2561,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_docs() {
let mut config = configure(&[], &[]);
config.cmd = Subcommand::Test {
paths: vec![],
test_args: vec![],
rustc_args: vec![],
fail_fast: true,
doc_tests: DocTests::Yes,
bless: false,
... | rust_cleaned_test_functions.jsonl/103565 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 816
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49692,
368,
341,
1789,
286,
1077,
5206,
2193,
284,
14411,
2099,
12995,
609,
56703,
286,
2193,
25724,
284,
3719,
5631,
486,
2271,
341,
310,
12716,
25,
7486,
20703,
1259,
310,
1273,
8384,
25,
7486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_operations_hash() -> Result<(), failure::Error> {
let decoded = HashType::OperationListListHash.string_to_bytes("LLoaGLRPRx3Zf8kB4ACtgku8F4feeBiskeb41J1ciwfcXB3KzHKXc")?;
let decoded = hex::encode(&decoded);
let expected = "7c09f7c4d76ace86e1a7e1c7dc0a0c7edcaa8b284... | rust_cleaned_test_functions.jsonl/65928 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 205
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
57345,
8950,
368,
1464,
5714,
68843,
7901,
486,
1454,
29,
341,
286,
1077,
29213,
284,
6531,
929,
486,
8432,
852,
852,
6370,
4804,
2346,
12524,
445,
4086,
19533,
3825,
49,
6480,
87,
18,
57... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_vch_f2_00_02() {
#[cfg(feature = "v3")]
init_psa_crypto();
let vch = Voucher::try_from(VCH_F2_00_02).unwrap();
let (sig, alg) = vch.get_signature().unwrap();
assert_eq!(sig.len(), 64);
assert_eq!(*alg, SignatureAlgorithm::ES256);
assert_eq!(vch.get_signer_ce... | rust_cleaned_test_functions.jsonl/81739 | {
"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,
15227,
2273,
331,
761,
17,
62,
15,
15,
62,
15,
17,
368,
341,
262,
11506,
14072,
27062,
284,
330,
85,
18,
5422,
262,
2930,
620,
9081,
78298,
1428,
262,
1077,
348,
331,
284,
647,
23937,
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... | 1 |
#[test]
fn test_shortest_paths_5() {
let g = super::Digraph::from_vec(&vec![
None, Some(1.0f64), None,
None, None, Some(2.0f64),
Some(-4.0f64), None, None
]);
assert_eq!(g.bellman_ford(0),
Err(GraphErrors::ContainsNegativeCycle));
... | rust_cleaned_test_functions.jsonl/42296 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 219
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16673,
477,
24152,
62,
20,
368,
341,
286,
1077,
342,
284,
2256,
486,
37098,
1935,
486,
1499,
13251,
2099,
4083,
90515,
310,
2240,
11,
4329,
7,
16,
13,
15,
69,
21,
19,
701,
2240,
345,
310,
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_resumable_seal_v1_1() {
let porep_id_v1_1: u64 = 5; // This is a RegisteredSealProof value
let mut porep_id = [0u8; 32];
porep_id[..8].copy_from_slice(&porep_id_v1_1.to_le_bytes());
run_resumable_seal::<SectorShape2KiB>(false, 0, &porep_id);
run_resumable_seal::<SectorShape2... | rust_cleaned_test_functions.jsonl/4371 | {
"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,
4918,
372,
480,
3453,
278,
2273,
16,
62,
16,
368,
341,
262,
1077,
96451,
79,
842,
2273,
16,
62,
16,
25,
575,
21,
19,
284,
220,
20,
26,
442,
1096,
374,
264,
35539,
1514,
278,
31076,
897,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_conf_change_remove_leader() {
let mut cluster = new_node_cluster(0, 3);
cluster.cfg.raft_store.allow_remove_leader = false;
let pd_client = Arc::clone(&cluster.pd_client);
pd_client.disable_default_operator();
let r1 = cluster.run_conf_change();
pd_client.must_add_peer(r1... | rust_cleaned_test_functions.jsonl/107620 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 392
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16059,
15947,
18193,
79991,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
18,
317,
262,
10652,
30481,
13,
2944,
14809,
57456,
18193,
79991,
284,
895,
280,
262,
1077,
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_slot_subscribe() {
let GenesisConfigInfo { genesis_config, .. } = create_genesis_config(10_000);
let bank = Bank::new(&genesis_config);
let bank_forks = Arc::new(RwLock::new(BankForks::new(bank)));
let rpc = RpcSolPubSubImpl::default_with_bank_forks(bank_forks);
... | rust_cleaned_test_functions.jsonl/4705 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 511
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27563,
88935,
368,
341,
286,
1077,
40788,
2648,
1731,
314,
59366,
5332,
11,
5241,
335,
284,
1855,
16322,
13774,
5332,
7,
16,
15,
62,
15,
15,
15,
317,
286,
1077,
6073,
284,
8547,
486,
931,
2099... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_iter_keys() {
let dict = sample_dict("abcd");
assert_eq!(dict.iter_keys().count(), 1);
autoreleasepool(|pool| {
assert_eq!(dict.iter_keys().next().unwrap().as_str(pool), "abcd");
});
} | rust_cleaned_test_functions.jsonl/108471 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
12631,
368,
341,
286,
1077,
6451,
284,
6077,
5243,
445,
68644,
797,
286,
2060,
10714,
10297,
8477,
19471,
12631,
1005,
1830,
1507,
220,
16,
317,
286,
74566,
10285,
22428,
10285,
91,
341,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_plan_fetch_and_lookup() {
let clause_a = Clause::new(Unbound("a".into()), Bound(Ident::Entity(Entity(1))), Unbound("b".into()));
let clause_b = Clause::new(Unbound("b".into()), Bound(Ident::Entity(Entity(2))), Unbound("c".into()));
let find = vec!["a".into(), "b".into(), ... | rust_cleaned_test_functions.jsonl/77548 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 342
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26564,
11803,
8378,
27464,
368,
341,
286,
1077,
21647,
4306,
284,
55797,
486,
931,
49289,
10891,
445,
64,
3263,
18122,
11858,
37176,
7,
28301,
486,
3030,
33761,
7,
16,
36363,
1230,
10891,
445,
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... | 1 |
#[test]
fn test_query_matches_with_simple_pattern() {
allocations::record(|| {
let language = get_language("javascript");
let query = Query::new(
language,
"(function_declaration name: (identifier) @fn-name)",
)
.unwrap();
assert_query_matches... | rust_cleaned_test_functions.jsonl/25146 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 305
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
38344,
6615,
30015,
21260,
368,
341,
262,
69642,
486,
8548,
79453,
341,
286,
1077,
4128,
284,
633,
29021,
445,
14073,
797,
286,
1077,
3239,
284,
11361,
486,
931,
1006,
310,
4128,
345,
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... | 2 |
#[test]
fn test_transpose() {
assert_eq!(A.transpose(),
Matrix3::<f64>::new(1.0f64, 2.0f64, 3.0f64,
4.0f64, 5.0f64, 6.0f64,
7.0f64, 8.0f64, 9.0f64));
} | rust_cleaned_test_functions.jsonl/30155 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 202
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7965,
2900,
368,
341,
286,
2060,
10714,
10297,
32,
35305,
3148,
4293,
11631,
18,
27638,
69,
21,
19,
6831,
931,
7,
16,
13,
15,
69,
21,
19,
11,
220,
17,
13,
15,
69,
21,
19,
11,
220,
18,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_event_serialisation_with_no_more_events() {
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
enum Event {
SomeEvent,
SomeOtherEvent,
}
let reply = event_reply::<Event, u32, _>(None, |_| 10);
let mut buf = [0; 32];
... | rust_cleaned_test_functions.jsonl/65560 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 346
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6748,
25602,
7923,
6615,
6536,
36664,
19691,
368,
341,
286,
11506,
27098,
65297,
11,
11091,
11,
48440,
11,
55039,
11,
39900,
5563,
286,
7618,
3665,
341,
310,
4329,
1556,
345,
310,
4329,
11409,
155... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_array_fmt_debug() {
let values: [u8; 15] = *b"hellotherearrow";
let array_data = ArrayData::builder(DataType::FixedSizeBinary(5))
.len(3)
.add_buffer(Buffer::from(&values[..]))
.build();
let arr = FixedSizeBinaryArray::from(arra... | rust_cleaned_test_functions.jsonl/11629 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 278
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31761,
3858,
38128,
15446,
368,
341,
286,
1077,
2750,
25,
508,
84,
23,
26,
220,
16,
20,
60,
284,
353,
65,
1,
14990,
18532,
6044,
3302,
286,
1077,
1334,
1769,
284,
2910,
1043,
486,
17850,
63941... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_events_idle() {
let mut events = EventQueue::existing(std::iter::empty()).expect("failed to create Events");
assert_eq!(events.pop_front(), Some(fidl_interfaces::Event::Idle(fidl_interfaces::Empty)));
assert_eq!(events.pop_front(), None);
} | rust_cleaned_test_functions.jsonl/39896 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 121
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19691,
47810,
368,
341,
286,
1077,
5206,
4357,
284,
3665,
7554,
486,
36895,
5194,
486,
2015,
486,
3194,
6011,
17119,
445,
16091,
311,
1855,
17627,
797,
286,
2060,
10714,
10297,
12389,
8288,
22926,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 mut decoder = Decoder::new(from_str("\"Dog\"").unwrap());
let value: Animal = Decodable::decode(&mut decoder).unwrap();
assert_eq!(value, Dog);
let s = "{\"variant\":\"Frog\",\"fields\":[\"Henry\",349]}";
let mut decoder = Decoder::new... | rust_cleaned_test_functions.jsonl/111035 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 205
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
31054,
368,
341,
286,
1077,
5206,
24551,
284,
50472,
486,
931,
17016,
2895,
38915,
48940,
2105,
1827,
15454,
1423,
286,
1077,
897,
25,
21292,
284,
3714,
69129,
486,
18196,
2099,
6984,
24551,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_top_k_frequent() {
assert_eq!(
sorted(Solution::top_k_frequent(vec![1, 1, 1, 2, 2, 3], 2)),
vec![1, 2]
);
assert_eq!(Solution::top_k_frequent(vec![1], 1), vec![1]);
} | rust_cleaned_test_functions.jsonl/117117 | {
"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,
10426,
4698,
761,
69691,
368,
341,
286,
2060,
10714,
33673,
310,
10615,
3759,
3214,
486,
3481,
4698,
761,
69691,
25592,
20703,
16,
11,
220,
16,
11,
220,
16,
11,
220,
17,
11,
220,
17,
11,
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... | 1 |
#[test]
fn test_color_from_hex_rgba() {
assert_eq!(Color::from(0x00000000), Color::from((0.0, 0.0, 0.0, 0.0)));
assert_eq!(Color::from(0xFF00FFFF), Color::from((1.0, 0.0, 1.0, 1.0)));
assert_eq!(Color::from(0xFFFFFFFF), Color::from((1.0, 1.0, 1.0, 1.0)));
assert_eq!(Color::from(0... | rust_cleaned_test_functions.jsonl/57744 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 331
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6714,
5673,
32655,
95229,
368,
341,
286,
2060,
10714,
10297,
1636,
486,
1499,
7,
15,
87,
15,
15,
15,
15,
15,
15,
15,
15,
701,
3478,
486,
1499,
1188,
15,
13,
15,
11,
220,
15,
13,
15,
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_struct_map() {
let res = StructWithMap::parse(INPUT_16);
assert_eq!(
res,
Ok((
&INPUT_16[5..],
StructWithMap {
a: 1,
int_str: "18".to_string()
}
))
);
} | rust_cleaned_test_functions.jsonl/48209 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 179
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15126,
5376,
368,
341,
262,
1077,
592,
284,
16139,
2354,
2227,
486,
6400,
57911,
62,
16,
21,
317,
262,
2060,
10714,
33673,
286,
592,
345,
286,
7622,
94702,
310,
609,
29421,
62,
16,
21,
58,
20,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_compilation_errors() {
let _pool = ConstPool::new();
let text = r"
script {
fun main() {
let _ = 0x0::Transaction::sender();
}
}";
let errors = execute_script(
MoveFile::with_content(script_path(), text),
vec![],
"libra",
"0x11111... | rust_cleaned_test_functions.jsonl/43913 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 257
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15267,
18177,
13455,
20196,
368,
341,
262,
1077,
716,
10285,
284,
24522,
10551,
486,
931,
1428,
262,
1077,
1467,
284,
435,
698,
2282,
341,
262,
2464,
1887,
368,
341,
286,
1077,
716,
284,
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_parse_ok() {
let mi = MetaItem {
name: Symbol::intern("all"),
node: MetaItemKind::Word,
span: DUMMY_SP,
};
assert_eq!(Cfg::parse(&mi), Ok(word_cfg("all")));
let mi = MetaItem {
name: Symbol::intern("all"),
... | rust_cleaned_test_functions.jsonl/57875 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3069
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
19817,
368,
341,
286,
1077,
9497,
284,
15819,
1234,
341,
310,
829,
25,
19612,
486,
55444,
445,
541,
4461,
310,
2436,
25,
15819,
1234,
10629,
486,
10879,
345,
310,
9390,
25,
422,
58673,
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_used_in_while_expr() {
check_assist(
inline_local_variable,
"
fn foo() {
let a<|> = 1 > 0;
while a {}
}",
"
fn foo() {
<|>while 1 > 0 {}
}",
);
} | rust_cleaned_test_functions.jsonl/60331 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27803,
1243,
86069,
21915,
368,
341,
286,
1779,
12083,
380,
1006,
310,
7381,
13564,
14635,
345,
310,
6228,
8822,
15229,
368,
341,
262,
1077,
264,
27,
91,
29,
284,
220,
16,
861,
220,
15,
280,
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_banmen_to_sfen() {
let input_and_expected:Vec<(Banmen,Result<String,TypeConvertError<String>>)> = vec![
(Banmen([
[GKyouN,GKeiN,GGinN,GKin,GOu,GKin,GGin,GKei,GKyou],
[Blank,GHishaN,Blank,Blank,Blank,Blank,Blank,GKakuN,Blank],
[GFuN,GFuN,GFuN,GFuN,GFuN,GFu,GFu,GFu,GFu],
[Blan... | rust_cleaned_test_functions.jsonl/46539 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1278
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
276,
5676,
2346,
643,
30353,
368,
972,
10217,
1946,
8378,
32190,
25,
10050,
28706,
50241,
5676,
11,
2077,
3464,
11,
929,
12012,
1454,
3464,
2452,
16018,
284,
7486,
20703,
319,
197,
197,
5349,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_cp_arg_interactive() {
new_ucmd!()
.arg(TEST_HELLO_WORLD_SOURCE)
.arg(TEST_HOW_ARE_YOU_SOURCE)
.arg("-i")
.pipe_in("N\n")
.succeeds()
.stderr_contains("Not overwriting");
} | rust_cleaned_test_functions.jsonl/21240 | {
"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,
39811,
6057,
15318,
3028,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
858,
50320,
69235,
1593,
38913,
25430,
340,
286,
659,
858,
50320,
2039,
3307,
1566,
787,
10626,
11922,
25430,
340,
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_programs() {
parse(include_str!("../../../../test-files/classes.lox"));
parse(include_str!("../../../../test-files/counter.lox"));
parse(include_str!("../../../../test-files/fib.lox"));
parse(include_str!("../../../../test-files/fizzbuzz1.lox"));
parse(include_str!("../../../../test-files/f... | rust_cleaned_test_functions.jsonl/31464 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 242
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25096,
82,
368,
341,
75115,
77863,
2895,
17223,
84257,
1944,
46048,
47058,
43749,
87,
4010,
75115,
77863,
2895,
17223,
84257,
1944,
46048,
14,
8292,
43749,
87,
4010,
75115,
77863,
2895,
17223,
84257,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_vote_outcome_one_vote_player() {
let uuid = UUID::random();
let state = TallyingState::new(
vec![(VoteTarget::Player { uuid }, vec![uuid])]
.into_iter()
.collect(),
);
assert_eq!(
state.determine_outcome_of_election(),
VoteOutcome::Player { uuid ... | rust_cleaned_test_functions.jsonl/58282 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54360,
6068,
2020,
11667,
54360,
15524,
368,
341,
262,
1077,
16040,
284,
23698,
486,
11463,
543,
262,
1077,
1584,
284,
350,
745,
287,
1397,
486,
931,
1006,
414,
7486,
0,
9697,
41412,
6397,
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_prelude() {
let _ = ::env_logger::try_init();
let vm = make_vm();
run_expr::<OpaqueValue<&Thread, Hole>>(&vm, r#" import! std.prelude "#);
} | rust_cleaned_test_functions.jsonl/8950 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 83
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
85068,
368,
341,
262,
1077,
716,
284,
3504,
3160,
27413,
486,
1539,
6137,
543,
262,
1077,
10995,
284,
1281,
39008,
543,
262,
1598,
21915,
27638,
69398,
1130,
52244,
6855,
11,
50929,
2452,
209... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_struct_with_maps_roundtrip() {
let map_struct = StructWithMaps {
num_map: vec![(1, 1), (2, u64::max_value())].into_iter().collect(),
string_map: vec![(1, String::from("abc")), (2, String::from("def"))]
.into_iter()
.collect(),
bytes_map: vec![(... | rust_cleaned_test_functions.jsonl/15770 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 547
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15126,
6615,
46512,
29896,
32981,
368,
341,
262,
1077,
2415,
15126,
284,
16139,
2354,
36562,
341,
286,
1629,
5376,
25,
7486,
0,
9697,
16,
11,
220,
16,
701,
320,
17,
11,
575,
21,
19,
486,
2810,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_downsampler_with_data_gap() {
// output samples between 200ms and 550ms.
let duration_micros = 1_000_000;
let raw_interval_micros = 10_000;
let downsampling_interval_micros = 100_000;
let raw_data_gap_micros = [230_000, 440_000];... | rust_cleaned_test_functions.jsonl/90587 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 688
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13998,
82,
34501,
6615,
1769,
51790,
368,
341,
73363,
286,
442,
2550,
10469,
1948,
220,
17,
15,
15,
1011,
323,
220,
20,
20,
15,
1011,
624,
286,
1077,
8090,
73003,
82,
284,
220,
16,
62,
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... | 5 |
#[test]
fn test_der_set_defined() {
let empty = &b""[..];
let bytes = [
0x31, 0x0a, 0x02, 0x03, 0x01, 0x00, 0x01, 0x02, 0x03, 0x01, 0x00, 0x00,
];
let expected = DerObject::from_set(vec![
DerObject::from_int_slice(b"\x01\x00\x01"),
DerObject::from_int_slice(b"\x01\x00\x00... | rust_cleaned_test_functions.jsonl/45873 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 360
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35345,
2602,
52870,
368,
341,
262,
1077,
4287,
284,
609,
65,
3014,
95874,
935,
262,
1077,
5820,
284,
2278,
286,
220,
15,
87,
18,
16,
11,
220,
15,
87,
15,
64,
11,
220,
15,
87,
15,
17,
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_loading_defaults() {
let manager = ConfigManager::default();
assert_eq!(manager.configs.len(), 3);
let key = SyntaxDefinition::Yaml.into();
assert!(manager.configs.contains_key(&key));
let yaml = manager.configs.get(&key).unwrap();
assert_eq!(yaml.... | rust_cleaned_test_functions.jsonl/40014 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 162
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57726,
42290,
368,
341,
286,
1077,
6645,
284,
5532,
2043,
486,
2258,
543,
286,
2060,
10714,
10297,
13297,
5423,
82,
19406,
1507,
220,
18,
317,
286,
1077,
1376,
284,
32117,
10398,
486,
56,
9467,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_signature() {
let mut rng = XorShiftRng::from_seed([1, 2, 3, 4]);
let mut random_msg = |len| rng.gen_iter::<u8>().take(len).collect::<Vec<_>>();
let (pk, serialized_pk) = gen_private_key_and_its_be_bytes();
let pubkey = public_key_from_private(&pk);
for msg_len in &[0, 2, 4... | rust_cleaned_test_functions.jsonl/114192 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 477
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39859,
368,
341,
262,
1077,
5206,
28422,
284,
1599,
269,
24841,
49,
968,
486,
1499,
33809,
2561,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
2558,
262,
1077,
5206,
4194,
6483,
284,
760,
2892,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_init_can_be_called_with_no_pool_config() {
init!("false");
wallet::close_wallet().unwrap();
let content = json!({
"wallet_name": settings::DEFAULT_WALLET_NAME,
"wallet_key": settings::DEFAULT_WALLET_KEY
}).to_string();
let cb = re... | rust_cleaned_test_functions.jsonl/127529 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 403
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6137,
27421,
21263,
27859,
6615,
6536,
15709,
5332,
368,
341,
286,
2930,
17223,
3849,
797,
286,
15085,
486,
5552,
62308,
1005,
15454,
1428,
286,
1077,
2213,
284,
2951,
0,
2262,
310,
330,
35735,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.