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_base64_random() { use rand::{thread_rng, Rng}; for _ in 0..1000 { let times = thread_rng().gen_range(1, 100); let v = thread_rng().gen_iter::<u8>().take(times) .collect::<Vec<_>>(); assert_eq!(v.to_base64(STANDARD) .from_base64() .unwrap(), v); } }
rust_cleaned_test_functions.jsonl/5196
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 283 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 7651, 21, 19, 22644, 368, 341, 286, 990, 10382, 22964, 4528, 66849, 11, 431, 968, 2315, 286, 369, 716, 304, 220, 15, 496, 16, 15, 15, 15, 341, 310, 1077, 3039, 284, 4516, 66849, 1005, 4370, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_flush_error() { const EACCESS: i32 = 13; let mut txbuf = TxBuf::new(); let mut sink = TestSink::new(); txbuf.push(&[1, 2, 3, 4]).unwrap(); let io_err = IoError::from_raw_os_error(EACCESS); sink.set_err(io_err); match txbuf.flush_to(&mut sink) { Err(Error::TxBufFlush(ref err)) if err.kind() == ErrorKind::PermissionDenied => (), other => panic!("Unexpected result: {:?}", other), } }
rust_cleaned_test_functions.jsonl/24613
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 247 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 39213, 4096, 368, 341, 286, 733, 468, 55749, 25, 600, 18, 17, 284, 220, 16, 18, 401, 286, 1077, 5206, 9854, 5909, 284, 350, 14377, 1704, 486, 931, 543, 286, 1077, 5206, 19309, 284, 3393, 45094...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_default_audio_params() { let default_q = 1.0; let default_detune = 0.; let default_gain = 0.; let default_freq = 350.; let default_type = BiquadFilterType::Lowpass; let mut context = OfflineAudioContext::new(2, LENGTH, SampleRate(44_100)); let biquad = BiquadFilterNode::new(&context, BiquadFilterOptions::default()); context.start_rendering_sync(); assert_float_eq!(biquad.q().value(), default_q, abs <= 0.); assert_float_eq!(biquad.detune().value(), default_detune, abs <= 0.); assert_float_eq!(biquad.gain().value(), default_gain, abs <= 0.); assert_float_eq!(biquad.frequency().value(), default_freq, abs <= 0.); assert_eq!(biquad.type_(), default_type); }
rust_cleaned_test_functions.jsonl/59484
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 345 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 9993, 29688, 6745, 368, 341, 286, 1077, 1638, 8976, 284, 220, 16, 13, 15, 280, 286, 1077, 1638, 24409, 2886, 284, 220, 15, 37403, 286, 1077, 1638, 39925, 284, 220, 15, 37403, 286, 1077, 1638, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_empty_input() { new_ucmd!() .args(&["-m", "empty.txt"]) .succeeds() .no_stderr() .no_stdout(); }
rust_cleaned_test_functions.jsonl/20547
{ "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, 20888, 15124, 5898, 368, 341, 262, 501, 68887, 2277, 0, 741, 286, 659, 2116, 2099, 1183, 12, 76, 497, 330, 3194, 3909, 14108, 286, 659, 82, 29264, 82, 741, 286, 659, 2152, 93033, 741, 286, 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
#[test] fn test_rfc_section_6_pub_priv_basepoint() { let mut alice_pub = [0u8; 32]; let mut alice_priv = [0u8; 32]; let mut bob_pub = [0u8; 32]; let mut bob_priv = [0u8; 32]; let mut shared = SharedKey::from([0u8; 32]); hex::decode_to_slice( "77076d0a7318a57d3c16c17251b26645df4c2f87ebc0992ab177fba51db92c2a", &mut alice_priv, ) .unwrap(); hex::decode_to_slice( "8520f0098930a754748b7ddcb43ef75a0dbf3a0d26381af4eba4a98eaa9b4e6a", &mut alice_pub, ) .unwrap(); assert_eq!( key_agreement(&PrivateKey::from(alice_priv), &PublicKey::from(BASEPOINT)).unwrap(), PublicKey::from(alice_pub).to_bytes().as_ref() ); hex::decode_to_slice( "5dab087e624a8a4b79e17f8b83800ee66f3bb1292618b6fd1c2f8b27ff88e0eb", &mut bob_priv, ) .unwrap(); hex::decode_to_slice( "de9edb7d7b7dc1b4d35b61c2ece435373f8343c85b78674dadfc7e146f882b4f", &mut bob_pub, ) .unwrap(); assert_eq!( key_agreement(&PrivateKey::from(bob_priv), &PublicKey::from(BASEPOINT)).unwrap(), PublicKey::from(bob_pub).to_bytes().as_ref() ); hex::decode_to_slice( "4a5d9d5ba4ce2de1728e3bf480350f25e07e21c947d19e3376f09b3c1e161742", &mut shared.value, ) .unwrap(); assert_eq!( key_agreement(&PrivateKey::from(alice_priv), &PublicKey::from(bob_pub)).unwrap(), shared.value.as_ref() ); assert_eq!( key_agreement(&PrivateKey::from(bob_priv), &PublicKey::from(alice_pub)).unwrap(), shared.value.as_ref() ); }
rust_cleaned_test_functions.jsonl/4455
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 1060 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 1710, 8316, 16221, 62, 21, 34014, 24726, 7651, 2768, 368, 341, 286, 1077, 5206, 70433, 34014, 284, 508, 15, 84, 23, 26, 220, 18, 17, 935, 286, 1077, 5206, 70433, 24726, 284, 508, 15, 84, 23, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_txn_store_resolve_lock2() { for &i in &[ 0, 1, RESOLVE_LOCK_BATCH_SIZE - 1, RESOLVE_LOCK_BATCH_SIZE, RESOLVE_LOCK_BATCH_SIZE + 1, RESOLVE_LOCK_BATCH_SIZE * 2, ] { test_txn_store_resolve_lock_batch(1, i); } for &i in &[1, 512, 1024] { test_txn_store_resolve_lock_batch(i, 50); } }
rust_cleaned_test_functions.jsonl/37878
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 225 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 92299, 14809, 77291, 9818, 17, 368, 341, 262, 369, 609, 72, 304, 609, 9640, 286, 220, 15, 345, 286, 220, 16, 345, 286, 13170, 84322, 27661, 74009, 4098, 481, 220, 16, 345, 286, 13170, 84322, 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...
3
#[test] fn test_transaction_signature_err_modified_fee() { let mut rng: StdRng = SeedableRng::from_seed([1u8; 32]); let (mut tx, _ledger) = create_test_tx(); tx.prefix.fee = tx.prefix.fee + 1; match validate_signature(&tx, &mut rng) { Err(TransactionValidationError::InvalidTransactionSignature(_e)) => {} // Expected. Err(e) => { panic!(alloc::format!("Unexpected error {}", e)); } Ok(()) => panic!(), } }
rust_cleaned_test_functions.jsonl/78565
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 255 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 28884, 39859, 9266, 37749, 34305, 368, 341, 286, 1077, 5206, 28422, 25, 42517, 49, 968, 284, 35822, 480, 49, 968, 486, 1499, 33809, 2561, 16, 84, 23, 26, 220, 18, 17, 2558, 286, 1077, 320, 698...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_hover_infer_associated_method_exact() { let (analysis, position) = single_file_with_position( " struct Thing { x: u32 } impl Thing { fn new() -> Thing { Thing { x: 0 } } } fn main() { let foo_test = Thing::new<|>(); } ", ); let hover = analysis.hover(position).unwrap().unwrap(); assert_eq!(trim_markup_opt(hover.info.first()), Some("fn new() -> Thing")); assert_eq!(hover.info.is_exact(), true); }
rust_cleaned_test_functions.jsonl/27085
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 344 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 53445, 1243, 802, 58665, 657, 9032, 71084, 368, 341, 286, 1077, 320, 34484, 11, 2309, 8, 284, 3175, 2458, 6615, 9661, 1006, 310, 6228, 310, 2036, 37200, 314, 856, 25, 575, 18, 17, 555, 310, 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_failure() { let f = TestFixture::new(); let run = || -> which::Result<PathBuf> { let p = _which(&f, "./b/bin")?; Ok(p.into_path_buf()) }; let _ = run(); }
rust_cleaned_test_functions.jsonl/13417
{ "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, 43618, 368, 341, 262, 1077, 282, 284, 3393, 18930, 486, 931, 1428, 262, 1077, 1598, 284, 1369, 1464, 892, 486, 2077, 82883, 15064, 29, 341, 286, 1077, 281, 284, 716, 8206, 2099, 69, 11, 5924, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_navigation_push_same_screen() { let mut state = BrowserState::new(); let new_screen = ScreenName::Artist("some_id".to_string()); state.update_with(BrowserAction::NavigationPush(new_screen.clone())); assert_eq!(state.current_screen(), &new_screen); assert_eq!(state.count(), 2); let events = state.update_with(BrowserAction::NavigationPush(new_screen.clone())); assert_eq!(state.current_screen(), &new_screen); assert_eq!(state.count(), 2); assert_eq!(events, vec![]); }
rust_cleaned_test_functions.jsonl/32248
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 236 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 58051, 14218, 33574, 17649, 368, 341, 286, 1077, 5206, 1584, 284, 16482, 1397, 486, 931, 543, 286, 1077, 501, 17649, 284, 13948, 675, 486, 40309, 445, 14689, 842, 3263, 983, 3904, 1423, 286, 1584,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_lit_with_trailing_comma() { assert_json_snapshot!(array_lit("[ true, true, ]\n".into()).unwrap().1); array_lit("[ true,\n true,\t ]\t".into()).unwrap(); }
rust_cleaned_test_functions.jsonl/77771
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 102 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 3858, 98399, 6615, 3547, 14277, 2965, 1728, 368, 341, 286, 2060, 9455, 53265, 10297, 1653, 98399, 10937, 830, 11, 830, 11, 2279, 59, 77, 3263, 18122, 6011, 15454, 1005, 16, 317, 286, 1334, 98399, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_full_node() { let mut env = SynchronizerEnv::new(2); env.start_next_synchronizer( SynchronizerEnv::default_handler(), RoleType::Validator, Waypoint::default(), false, None, ); env.start_next_synchronizer( SynchronizerEnv::default_handler(), RoleType::FullNode, Waypoint::default(), false, None, ); env.commit(0, 10); // first sync should be fulfilled immediately after peer discovery assert!(env.wait_for_version(1, 10, None)); env.commit(0, 20); // second sync will be done via long polling cause first node should send new request // after receiving first chunk immediately assert!(env.wait_for_version(1, 20, None)); }
rust_cleaned_test_functions.jsonl/32154
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 317 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 16372, 5084, 368, 341, 262, 1077, 5206, 6105, 284, 328, 14113, 3135, 14359, 486, 931, 7, 17, 317, 262, 6105, 4962, 11257, 643, 14113, 3135, 1006, 286, 328, 14113, 3135, 14359, 486, 2258, 10183, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_atom() { assert!(atom(b" ").is_err()); assert!(atom(b"").is_err()); let (rem, val) = atom(b"a(").unwrap(); assert_eq!(val, "a".try_into().unwrap()); assert_eq!(rem, b"("); let (rem, val) = atom(b"xxx yyy").unwrap(); assert_eq!(val, "xxx".try_into().unwrap()); assert_eq!(rem, b" yyy"); }
rust_cleaned_test_functions.jsonl/78681
{ "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, 42292, 368, 341, 286, 2060, 10297, 21855, 1883, 1, 27510, 285, 9266, 1423, 286, 2060, 10297, 21855, 1883, 1, 1827, 285, 9266, 5231, 286, 1077, 320, 1826, 11, 1044, 8, 284, 19124, 1883, 56693, 44...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_comment() { assert_eq!( Some(vec![Instruction::Build( Subset::NixOS, vec![ String::from("tests.foo"), String::from("tests.bar"), String::from("tests.baz"), ] ),]), parse("@GrahamCOfBorg test foo bar baz") ); }
rust_cleaned_test_functions.jsonl/4472
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 250 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 17638, 368, 341, 286, 2060, 10714, 33673, 310, 4329, 25592, 20703, 16664, 486, 11066, 1006, 394, 73223, 486, 45, 941, 3126, 345, 394, 7486, 90515, 503, 923, 486, 1499, 445, 23841, 58432, 4461, 503...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_lsh64_reg() { test_interpreter_and_jit_asm!( " mov r0, 0x1 mov r7, 4 lsh r0, r7 exit", [], (), { |_vm, res: Result| { res.unwrap() == 0x10 } }, 4 ); }
rust_cleaned_test_functions.jsonl/58939
{ "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, 907, 927, 21, 19, 4920, 368, 341, 262, 1273, 15318, 28637, 8378, 5374, 275, 67529, 33673, 286, 6228, 286, 1974, 435, 15, 11, 220, 15, 87, 16, 198, 286, 1974, 435, 22, 11, 220, 19, 198, 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_index_nonexistent() { let mut map = VecDequeMap::new(); map.insert(1, 2); map.insert(2, 1); map.insert(3, 4); map[4]; }
rust_cleaned_test_functions.jsonl/51627
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 129 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 3560, 21637, 64085, 368, 341, 310, 1077, 5206, 2415, 284, 11312, 73891, 2227, 486, 931, 1428, 310, 2415, 7030, 7, 16, 11, 220, 17, 317, 310, 2415, 7030, 7, 17, 11, 220, 16, 317, 310, 2415, 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
#[test] fn test_format_select_var() { assert_eq!(format_select_var("?foo99-people"), "ifoo99_people"); assert_eq!(format_select_var("?FOO99-pëople.123"), "iFOO99_p_ople_123"); assert_eq!(format_select_var("?foo①bar越"), "ifoo_bar_"); }
rust_cleaned_test_functions.jsonl/45654
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 136 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 8955, 13051, 4612, 368, 341, 286, 2060, 10714, 10297, 2243, 13051, 4612, 66689, 7975, 24, 24, 12, 16069, 3975, 330, 333, 2624, 24, 24, 62717, 797, 286, 2060, 10714, 10297, 2243, 13051, 4612, 66689...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_unquoting_badpercent() { assert_eq!(unquote("%xab").ok().unwrap(), "%xab"); assert_eq!(unquote("%X").ok().unwrap(), "%X"); assert_eq!(unquote("%").ok().unwrap(), "%"); assert_eq!(unquote_plus("%xab").ok().unwrap(), "%xab"); assert_eq!(unquote_plus("%X").ok().unwrap(), "%X"); assert_eq!(unquote_plus("%").ok().unwrap(), "%"); }
rust_cleaned_test_functions.jsonl/21622
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 168 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 4907, 446, 11519, 34199, 24422, 368, 341, 262, 2060, 10714, 10297, 359, 2949, 4430, 52616, 1827, 562, 1005, 15454, 1507, 5962, 52616, 797, 262, 2060, 10714, 10297, 359, 2949, 4430, 55, 1827, 562, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_init_nonzero_default() { let mint_size = ExtensionType::get_account_len::<Mint>(&[ExtensionType::MintPaddingTest]); let mut buffer = vec![0; mint_size]; let mut state = StateWithExtensionsMut::<Mint>::unpack_uninitialized(&mut buffer).unwrap(); state.base = TEST_MINT; state.pack_base(); state.init_account_type().unwrap(); let extension = state.init_extension::<MintPaddingTest>(true).unwrap(); assert_eq!(extension.padding1, [1; 128]); assert_eq!(extension.padding2, [2; 48]); assert_eq!(extension.padding3, [3; 9]); }
rust_cleaned_test_functions.jsonl/90550
{ "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, 6137, 21637, 14154, 9993, 368, 341, 286, 1077, 28337, 2368, 284, 26473, 929, 486, 455, 13500, 6043, 27638, 44, 396, 44784, 58, 12049, 929, 486, 44, 396, 21616, 2271, 2558, 286, 1077, 5206, 4147, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_append() { let mut list = SongList::new_from_initial_batch(batch(0)); list.append(vec![song("song2")]); list.append(vec![song("song3")]); list.append(vec![song("song4")]); let mut list_iter = list.iter(); assert_eq!(list_iter.next().unwrap().id, "song0"); assert_eq!(list_iter.next().unwrap().id, "song1"); assert_eq!(list_iter.next().unwrap().id, "song2"); assert_eq!(list_iter.next().unwrap().id, "song3"); assert_eq!(list_iter.next().unwrap().id, "song4"); assert!(list_iter.next().is_none()); }
rust_cleaned_test_functions.jsonl/101863
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 291 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 26041, 368, 341, 286, 1077, 5206, 1140, 284, 18971, 852, 486, 931, 5673, 15809, 14534, 30139, 7, 15, 1106, 286, 1140, 2057, 25592, 20703, 31751, 445, 31751, 17, 899, 2558, 286, 1140, 2057, 25592, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_process_ftw_command_build() { let project = Project::new(); let cmd = FtwCommand::New { project_name: project.get_name(), template: FtwTemplate::default(), }; let _ = cmd.process(); let _ = env::set_current_dir(Path::new(&project.get_name())); let target: FtwTarget = util::get_current_platform().parse().unwrap(); let cmd = FtwCommand::Build { target: target.clone(), build_type: FtwBuildType::Debug, }; let _ = cmd.process(); let _ = env::set_current_dir(Path::new("../")); assert!(project .read("rust/Cargo.toml") .contains(&project.get_name())); assert!(project.exists(&format!( "lib/{}/{}{}.{}", target.to_cli_arg(), target.to_lib_prefix(), project.get_name(), target.to_lib_ext() ))); }
rust_cleaned_test_functions.jsonl/27384
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 482 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 11305, 41572, 86, 10811, 20801, 368, 341, 286, 1077, 2390, 284, 5787, 486, 931, 543, 286, 1077, 5439, 284, 434, 15560, 4062, 486, 3564, 341, 310, 2390, 1269, 25, 2390, 670, 1269, 3148, 310, 3811...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_saturating_sub_uint() { use uint::MAX; assert_eq!(5u.saturating_sub(3u), 2u); assert_eq!(3u.saturating_sub(5u), 0u); assert_eq!(0u.saturating_sub(1u), 0u); assert_eq!((MAX-1).saturating_sub(MAX), 0); }
rust_cleaned_test_functions.jsonl/23664
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 152 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 643, 2628, 1095, 5228, 15807, 368, 341, 286, 990, 2622, 486, 10586, 280, 286, 2060, 10714, 10297, 20, 84, 514, 2628, 1095, 5228, 7, 18, 84, 701, 220, 17, 84, 317, 286, 2060, 10714, 10297, 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...
1
#[test] fn test_unsubscribe() { let topics: LimitedVec<LimitedString> = [LimitedString::from("a/b")].iter().cloned().collect(); let packet = Unsubscribe::new(Pid::try_from(12321).unwrap(), topics).into(); assert_decode_slice!(Packet::Unsubscribe(_), &packet, 9); }
rust_cleaned_test_functions.jsonl/59355
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 115 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 4907, 9384, 368, 341, 262, 1077, 13347, 25, 18905, 10050, 55570, 31511, 703, 29, 284, 508, 74477, 703, 486, 1499, 445, 64, 3470, 899, 936, 2015, 1005, 564, 19684, 1005, 17384, 1428, 262, 1077, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_routes() { let iter: GTFSIterator<_, Route> = GTFSIterator::from_path("./examples/good_feed/routes.txt").unwrap(); for result in iter { assert!(result.is_ok(), format!("{}", result.err().unwrap())); } }
rust_cleaned_test_functions.jsonl/7502
{ "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, 6443, 64314, 368, 341, 262, 1077, 5367, 25, 11911, 8485, 11951, 27, 6878, 9572, 29, 4035, 286, 11911, 8485, 11951, 486, 1499, 2638, 13988, 51668, 4846, 1386, 42390, 62970, 3909, 1827, 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 ]
2
#[test] fn test_key_manager_both_master_key_fail() { // create initial dictionaries. let _guard = LOCK_FOR_GAUGE.lock().unwrap(); let tmp_dir = tempfile::TempDir::new().unwrap(); let manager = new_key_manager_def(&tmp_dir, None).unwrap(); manager.new_file("foo").unwrap(); drop(manager); let master_key = Box::new(MockBackend { is_wrong_master_key: true, ..Default::default() }); let previous_master_key = Box::new(MockBackend { is_wrong_master_key: true, ..Default::default() }); let manager = new_mock_key_manager(&tmp_dir, None, master_key, previous_master_key); assert_matches!(manager.err(), Some(Error::BothMasterKeyFail(_, _))); }
rust_cleaned_test_functions.jsonl/22014
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 363 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 3097, 12144, 88819, 24582, 3097, 22121, 368, 341, 286, 442, 1855, 2856, 57514, 624, 286, 1077, 716, 26098, 284, 49463, 14516, 2646, 32, 47644, 21003, 1005, 15454, 543, 286, 1077, 4174, 4334, 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_merge_facets_sort_asc() { // In the merge case this will go through the doc_id mapping code test_merge_facets( Some(IndexSettings { sort_by_field: Some(IndexSortByField { field: "intval".to_string(), order: Order::Desc, }), ..Default::default() }), true, ); // sorted and disjunct test_merge_facets( Some(IndexSettings { sort_by_field: Some(IndexSortByField { field: "intval".to_string(), order: Order::Desc, }), ..Default::default() }), false, ); }
rust_cleaned_test_functions.jsonl/939
{ "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, 20888, 41589, 1415, 18435, 88474, 368, 341, 286, 442, 758, 279, 10880, 1142, 419, 686, 728, 1526, 279, 4629, 842, 12731, 2038, 198, 286, 1273, 20888, 41589, 1415, 1006, 310, 4329, 45030, 6086, 341...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_rng_clone() { let seed: &[_] = &[1, 23, 456, 7890, 12345]; let mut rng: Isaac64Rng = SeedableRng::from_seed(seed); let mut clone = rng.clone(); for _ in 0..16 { assert_eq!(rng.next_u64(), clone.next_u64()); } }
rust_cleaned_test_functions.jsonl/42035
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 157 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 66849, 54742, 368, 341, 286, 1077, 10320, 25, 609, 13496, 60, 284, 44590, 16, 11, 220, 17, 18, 11, 220, 19, 20, 21, 11, 220, 22, 23, 24, 15, 11, 220, 16, 17, 18, 19, 20, 935, 286, 1077, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_raw_instructions() { let input = "Step C must be finished before step A can begin.\nStep C must be finished before step F can begin.\nStep A must be finished before step B can begin.\nStep A must be finished before step D can begin.\nStep B must be finished before step E can begin.\nStep D must be finished before step E can begin.\nStep F must be finished before step E can begin.\n"; let result = parse_raw_instructions(input); let expected = vec![ ("A".to_string(), "C".to_string()), ("F".to_string(), "C".to_string()), ("B".to_string(), "A".to_string()), ("D".to_string(), "A".to_string()), ("E".to_string(), "B".to_string()), ("E".to_string(), "D".to_string()), ("E".to_string(), "F".to_string()), ]; assert_eq!(expected, result); }
rust_cleaned_test_functions.jsonl/50410
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 382 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 21039, 16067, 82427, 368, 341, 286, 1077, 1946, 284, 330, 8304, 356, 1969, 387, 8060, 1573, 3019, 362, 646, 3161, 7110, 77, 8304, 356, 1969, 387, 8060, 1573, 3019, 434, 646, 3161, 7110, 77, 8304...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_add_sum_2d() { use crate::other::rand::{rand_int, rand_range, random}; use crate::other::{fp::P, Fp}; let h_max = 100; let w_max = 100; let q = 100; for _ in 0..q { let h = rand_int(0..h_max); let w = rand_int(0..w_max); let q = 100; let mut a = RangeAddSum2d::<Fp>::new(h, w); let mut b = vec![vec![Fp(0); w]; h]; for _ in 0..q { let x = rand_range(0..h); let y = rand_range(0..w); if random() { let ans = b[x.clone()] .iter() .map(|b| b[y.clone()].iter().copied().sum()) .sum(); assert_eq!(a.sum(x, y), ans); } else { let v = Fp(rand_int(0..P)); a.add(x.clone(), y.clone(), &v); for b in &mut b[x.clone()] { for b in &mut b[y.clone()] { *b += v; } } } } } }
rust_cleaned_test_functions.jsonl/48311
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 670 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 9698, 2891, 10160, 62, 17, 67, 368, 341, 262, 990, 17717, 486, 1575, 486, 11335, 22964, 11335, 4042, 11, 10382, 9698, 11, 4194, 2440, 262, 990, 17717, 486, 1575, 22964, 10852, 486, 47, 11, 434, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
6
#[test] fn test_chained_dependency() { let mut builder: StagesBuilder = Default::default(); struct Sys; impl<'a> System<'a> for Sys { type SystemData = (); fn run(&mut self, _: Self::SystemData) {} } builder.insert(SmallVec::from(&[][..]), SystemId(0), Sys); builder.insert(SmallVec::from(&[SystemId(0)][..]), SystemId(1), Sys); builder.insert(SmallVec::from(&[SystemId(1)][..]), SystemId(2), Sys); assert_eq!(builder.ids[0][0][0], SystemId(0)); assert_eq!(builder.ids[1][0][0], SystemId(1)); assert_eq!(builder.ids[2][0][0], SystemId(2)); }
rust_cleaned_test_functions.jsonl/63509
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 316 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 4138, 2627, 62387, 368, 341, 286, 1077, 5206, 7363, 25, 794, 1134, 3297, 284, 7899, 486, 2258, 1428, 286, 2036, 28909, 401, 286, 11605, 18291, 64, 29, 739, 18291, 64, 29, 369, 28909, 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_addsd() { assert_emit!(0xf2, 0x0f, 0x58, 0xc1; addsd(XMM0, XMM1)); assert_emit!(0xf2, 0x41, 0x0f, 0x58, 0xdf; addsd(XMM3, XMM15)); assert_emit!(0xf2, 0x44, 0x0f, 0x58, 0xc4; addsd(XMM8, XMM4)); }
rust_cleaned_test_functions.jsonl/85487
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 157 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 2891, 13446, 368, 341, 286, 2060, 69082, 10297, 15, 5848, 17, 11, 220, 15, 87, 15, 69, 11, 220, 15, 87, 20, 23, 11, 220, 15, 8148, 16, 26, 11367, 67, 7644, 8035, 15, 11, 1599, 8035, 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_kernel_info_into_packets() { let command = Command::KernelInfo; assert_packets(PacketsTestData { command, expected_header_type: "kernel_info_request", expected_content: json!({}), }); }
rust_cleaned_test_functions.jsonl/53204
{ "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, 26876, 3109, 45514, 63569, 368, 341, 286, 1077, 3210, 284, 7348, 486, 26343, 1731, 280, 286, 2060, 63569, 5304, 18382, 83920, 341, 310, 3210, 345, 310, 3601, 8757, 1819, 25, 330, 23248, 3109, 7893...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_cyclical() { let initial = ndt("2000-01-01 00:00:00"); let mut cyclical = CyclicalSeries { start: initial, current: initial, period: Duration::weeks(1), min_rate: Duration::minutes(10), max_rate: Duration::hours(2), }; let mut rng = rand::thread_rng(); let iter1 = cyclical.next(&mut rng).into_yielded().unwrap(); let iter2 = cyclical.next(&mut rng).into_yielded().unwrap(); let iter3 = cyclical.next(&mut rng).into_yielded().unwrap(); assert!(initial < iter1); assert!(iter1 < iter2); assert!(iter2 < iter3); }
rust_cleaned_test_functions.jsonl/33875
{ "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, 666, 3337, 31248, 368, 341, 286, 1077, 2856, 284, 15581, 83, 445, 17, 15, 15, 15, 12, 15, 16, 12, 15, 16, 220, 15, 15, 25, 15, 15, 25, 15, 15, 797, 286, 1077, 5206, 43348, 31248, 284, 80...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_du_time() { let scene = TestScenario::new(util_name!()); scene .ccmd("touch") .arg("-a") .arg("-t") .arg("201505150000") .arg("date_test") .succeeds(); scene .ccmd("touch") .arg("-m") .arg("-t") .arg("201606160000") .arg("date_test") .succeeds(); let result = scene.ucmd().arg("--time").arg("date_test").succeeds(); result.stdout_only("0\t2016-06-16 00:00\tdate_test\n"); let result = scene.ucmd().arg("--time=atime").arg("date_test").succeeds(); result.stdout_only("0\t2015-05-15 00:00\tdate_test\n"); let result = scene.ucmd().arg("--time=ctime").arg("date_test").succeeds(); result.stdout_only("0\t2016-06-16 00:00\tdate_test\n"); #[cfg(not(target_env = "musl"))] { use regex::Regex; let re_birth = Regex::new(r"0\t[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}\tdate_test").unwrap(); let result = scene.ucmd().arg("--time=birth").arg("date_test").succeeds(); result.stdout_matches(&re_birth); } }
rust_cleaned_test_functions.jsonl/23738
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 583 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 814, 84, 3009, 368, 341, 262, 1077, 6109, 284, 3393, 54031, 486, 931, 67811, 1269, 0, 5231, 262, 6109, 198, 286, 659, 638, 2277, 445, 22020, 1138, 286, 659, 858, 13645, 64, 1138, 286, 659, 858...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_nft_cannot_transfer_before_claim_error() { let (mut context, tx) = create_test_context( Action::Update(UpdateCase::Transfer), NftError::NFTCannotTransferBeforeClaim, ); let tx = context.complete_tx(tx); // run let err = context.verify_tx(&tx, MAX_CYCLES).unwrap_err(); let script_cell_index = 0; assert_error_eq!( err, ScriptError::ValidationFailure(NFT_CANNOT_TRANSFER_BEFORE_CLAIM) .input_type_script(script_cell_index) ); }
rust_cleaned_test_functions.jsonl/33597
{ "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, 8882, 1089, 723, 666, 3401, 35403, 23708, 84969, 4096, 368, 341, 262, 1077, 320, 6984, 2266, 11, 9854, 8, 284, 1855, 4452, 8467, 1006, 286, 5586, 486, 4289, 7, 4289, 4207, 486, 21970, 1326, 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_fill_pdt_from_tokens_panic() { use DateTimeField::*; let test_cases = [ // Mismatched syntax ("1 2", "0 0", Microseconds, 1), ]; for test in test_cases.iter() { let mut pdt = ParsedDateTime::default(); let mut actual = tokenize_time_str(test.0).unwrap(); let expected = tokenize_time_str(test.1).unwrap(); if fill_pdt_from_tokens(&mut pdt, &mut actual, &expected, test.2, test.3).is_ok() { panic!( "test_fill_pdt_from_tokens_panic should have panicked. input {}\nformat {}\ \nDateTimeField {}\nGenerated ParsedDateTime {:?}", test.0, test.1, test.2, pdt ); }; } }
rust_cleaned_test_functions.jsonl/100327
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 439 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 30728, 620, 8047, 5673, 28838, 620, 31270, 368, 341, 286, 990, 6520, 1877, 56162, 286, 1077, 1273, 41427, 284, 2278, 310, 442, 386, 24976, 291, 19482, 198, 310, 3489, 16, 220, 17, 497, 330, 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...
3
#[test] fn test_basic_do() { let test_cases = vec![ ("(do )", Nil), ("(do 1 2 3)", Number(3)), ("(do (do 1 2))", Number(2)), ("(do (prn 101))", Nil), ("(do (prn 101) 7)", Number(7)), ("(do (prn 101) (prn 102) (+ 1 2))", Number(3)), ("(do (def! a 6) 7 (+ a 8))", Number(14)), ("(do (def! a 6) 7 (+ a 8) a)", Number(6)), ("(def! DO (fn* [a] 7)) (DO 3)", Number(7)), ]; run_eval_test(&test_cases); }
rust_cleaned_test_functions.jsonl/114208
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 313 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 34729, 26309, 368, 341, 286, 1077, 1273, 41427, 284, 7486, 90515, 310, 3489, 7, 2982, 873, 497, 32274, 1326, 310, 3489, 7, 2982, 220, 16, 220, 17, 220, 18, 11583, 5624, 7, 18, 6965, 310, 3489,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_mysql() { let s = "((((! `age` -) & (! `age` > `18`)) & (`sex` ? [male, Male] | `sex` ~ `Female`)) & `name` * `J?c*`)"; let search = parse(s).unwrap(); let mut renames = MysqlRenames::new(); renames.insert("name".into(), "t.name".into()); renames.insert("sex".into(), "gender".into()); let mut types = MysqlTypes::new(); types.insert("age".into(), MysqlType::Unsigned(None)); let interpreted = interpret(&search, &renames, &types).unwrap(); let (clause, binds) = interpreted.get(0).unwrap(); assert_eq!( clause, "((((NOT `age` IS NULL) AND (NOT `age` > ?)) AND (`gender` IN (?, ?) OR `gender` LIKE ?)) AND `t.name` LIKE ?)" ); assert_eq!( binds, &vec![ MysqlType::Unsigned(Some(18)), MysqlType::StringLike(Some("male".into())), MysqlType::StringLike(Some("Male".into())), MysqlType::StringLike(Some("Female".into())), MysqlType::StringLike(Some("J_c%".into())) ] ); }
rust_cleaned_test_functions.jsonl/103488
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 482 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 59992, 368, 341, 262, 1077, 274, 284, 330, 66844, 0, 1565, 424, 63, 481, 8, 609, 1505, 1565, 424, 63, 861, 1565, 16, 23, 63, 593, 609, 28654, 11553, 63, 937, 508, 36476, 11, 19396, 60, 760, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_readme_doomsday() { use num_iter::range_inclusive; for y in range_inclusive(naive::MIN_DATE.year(), naive::MAX_DATE.year()) { // even months let d4 = NaiveDate::from_ymd(y, 4, 4); let d6 = NaiveDate::from_ymd(y, 6, 6); let d8 = NaiveDate::from_ymd(y, 8, 8); let d10 = NaiveDate::from_ymd(y, 10, 10); let d12 = NaiveDate::from_ymd(y, 12, 12); let d59 = NaiveDate::from_ymd(y, 5, 9); let d95 = NaiveDate::from_ymd(y, 9, 5); let d711 = NaiveDate::from_ymd(y, 7, 11); let d117 = NaiveDate::from_ymd(y, 11, 7); // "March 0" let d30 = NaiveDate::from_ymd(y, 3, 1).pred(); let weekday = d30.weekday(); let other_dates = [d4, d6, d8, d10, d12, d59, d95, d711, d117]; assert!(other_dates.iter().all(|d| d.weekday() == weekday)); } }
rust_cleaned_test_functions.jsonl/32376
{ "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, 6443, 2660, 814, 4191, 82, 1292, 368, 341, 262, 990, 1629, 11723, 486, 9669, 1243, 8336, 401, 262, 369, 379, 304, 2088, 1243, 8336, 1445, 64, 533, 486, 16413, 18500, 24414, 1507, 49665, 486, 105...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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() { let actual = ColumnCopyCommand::new("Test".to_string(), "element".to_string(), "NewTest".to_string(), "new_element".to_string()) .build(); let expected_query: Query = vec![("from_table".to_string(), "Test".to_string()), ("from_name".to_string(), "element".to_string()), ("to_table".to_string(), "NewTest".to_string()), ("to_name".to_string(), "new_element".to_string())]; let expected = (ColumnCopy, expected_query); assert_eq!(expected, actual); }
rust_cleaned_test_functions.jsonl/51235
{ "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, 20801, 368, 341, 286, 1077, 5042, 284, 9332, 12106, 4062, 486, 931, 445, 2271, 3263, 983, 3904, 3148, 3344, 330, 6101, 3263, 983, 3904, 3148, 3344, 330, 3564, 2271, 3263, 983, 3904, 3148, 3344, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_updates(){ let s = r#"[{"update_id":108855559855411200,"channel_post":{"message_id":107408241729867776,"date":1590831008377,"chat":{"type":"channel","id":86506443020308480,"guild_id":76653526742339585,"title":""},"text":"[#@] 来吧","entities":[]}},{"update_id":108855544592338944,"channel_post":{"message_id":107408241729867776,"date":1590831008377,"chat":{"type":"channel","id":86506443020308480,"guild_id":76653526742339585,"title":""},"text":"[#@] 来吧","entities":[]}},{"update_id":108855529421541376,"channel_post":{"message_id":107408241729867776,"date":1590831008377,"chat":{"type":"channel","id":86506443020308480,"guild_id":76653526742339585,"title":""},"text":"[#@] 来吧","entities":[]}},{"update_id":108855501038686208,"channel_post":{"message_id":107408241729867776,"date":1590831008377,"chat":{"type":"channel","id":86506443020308480,"guild_id":76653526742339585,"title":""},"text":"[#@] 来吧","entities":[]}},{"update_id":108854411148791809,"channel_post":{"message_id":107408241729867776,"date":1590831008377,"chat":{"type":"channel","id":86506443020308480,"guild_id":76653526742339585,"title":""},"text":"[#@] 来吧","entities":[]}}]"#; let us = serde_json::from_str::<Vec<Update>>(s).unwrap(); }
rust_cleaned_test_functions.jsonl/78277
{ "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, 15227, 57829, 3032, 262, 1077, 274, 284, 435, 2, 36864, 4913, 2386, 842, 788, 16, 15, 23, 23, 20, 20, 20, 20, 24, 23, 20, 20, 19, 16, 16, 17, 15, 15, 1335, 10119, 6333, 22317, 1994, 842, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_coersion_scalar_and_list() { use crate::datatypes::DataType::*; assert_eq!( coerce_data_type(&[ Float64, List(Box::new(Field::new(ITEM_NAME, Float64, true))) ]), List(Box::new(Field::new(ITEM_NAME, Float64, true))), ); assert_eq!( coerce_data_type(&[Float64, List(Box::new(Field::new(ITEM_NAME, Int64, true)))]), List(Box::new(Field::new(ITEM_NAME, Float64, true))), ); assert_eq!( coerce_data_type(&[Int64, List(Box::new(Field::new(ITEM_NAME, Int64, true)))]), List(Box::new(Field::new(ITEM_NAME, Int64, true))), ); assert_eq!( coerce_data_type(&[ Boolean, List(Box::new(Field::new(ITEM_NAME, Float64, true))) ]), List(Box::new(Field::new(ITEM_NAME, Utf8, true))), ); }
rust_cleaned_test_functions.jsonl/45741
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 548 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 11393, 1325, 41652, 8378, 2019, 368, 341, 286, 990, 17717, 486, 5911, 60913, 486, 22653, 79304, 286, 2060, 10714, 33673, 310, 83025, 1769, 1819, 2099, 9640, 394, 13001, 21, 19, 345, 394, 1759, 677...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_mul_assign() { let mut x = Vec3::new(1.0, 0.0, -1.0); x *= 2.0; assert_eq!(x, Vec3::new(2.0, 0.0, -2.0)); }
rust_cleaned_test_functions.jsonl/35225
{ "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, 24944, 20688, 368, 341, 286, 1077, 5206, 856, 284, 11312, 18, 486, 931, 7, 16, 13, 15, 11, 220, 15, 13, 15, 11, 481, 16, 13, 15, 317, 286, 856, 11404, 220, 17, 13, 15, 280, 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_error() { let err: PayloadError = io::Error::new(io::ErrorKind::Other, "ParseError").into(); assert_eq!(format!("{}", err), "ParseError"); assert_eq!(format!("{}", err.cause().unwrap()), "ParseError"); let err = PayloadError::Incomplete; assert_eq!( format!("{}", err), "A payload reached EOF, but is not complete." ); }
rust_cleaned_test_functions.jsonl/1590
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 211 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 4096, 368, 341, 286, 1077, 1848, 25, 52916, 1454, 4035, 310, 6399, 486, 1454, 486, 931, 37258, 486, 1454, 10629, 486, 11409, 11, 330, 14463, 1454, 1827, 18122, 543, 286, 2060, 10714, 10297, 2243, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_mul_matrix_matrix() { let a: Matrix<usize> = Matrix::identity(3, 3); let b: Matrix<usize> = Matrix::identity(3, 3); let c: Matrix<usize> = Matrix::identity(3, 3); let d: Matrix<usize> = &a * &b; assert_eq!(d, c); }
rust_cleaned_test_functions.jsonl/60180
{ "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, 24944, 10193, 10193, 368, 341, 286, 1077, 264, 25, 11631, 90244, 29, 284, 11631, 486, 16912, 7, 18, 11, 220, 18, 317, 286, 1077, 293, 25, 11631, 90244, 29, 284, 11631, 486, 16912, 7, 18, 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_remap() { assert_eq!(remap_clamp(1.0, 0.0..=1.0, 0.0..=16.0), 16.0); assert_eq!(remap_clamp(1.0, 1.0..=0.0, 16.0..=0.0), 16.0); assert_eq!(remap_clamp(0.5, 1.0..=0.0, 16.0..=0.0), 8.0); }
rust_cleaned_test_functions.jsonl/73495
{ "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, 1288, 2186, 368, 341, 262, 2060, 10714, 10297, 1826, 391, 6794, 1121, 7, 16, 13, 15, 11, 220, 15, 13, 15, 496, 28, 16, 13, 15, 11, 220, 15, 13, 15, 496, 28, 16, 21, 13, 15, 701, 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...
1
#[test] fn test_rust_logo_scale_up() { // The goal of this test is to check how resistant the tessellator is against integer let mut builder = Path::builder().with_svg(); build_logo_path(&mut builder); let mut path = builder.build(); scale_path(&mut path, 260.0); test_path(path.as_slice()); }
rust_cleaned_test_functions.jsonl/102406
{ "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, 1710, 590, 29962, 16727, 8237, 368, 341, 262, 442, 576, 5795, 315, 419, 1273, 374, 311, 1779, 1246, 30685, 279, 79830, 613, 850, 374, 2348, 7546, 87079, 262, 1077, 5206, 7363, 284, 7933, 486, 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_cursor_next_entry_incomplete() { #[rustfmt::skip] let section = Section::with_endian(Endian::Little) .die(1, |s| s.attr_string("001")) .die(1, |s| s.attr_string("002")) .die(1, |s| s); let entries_buf = section.get_contents().unwrap(); let encoding = Encoding { format: Format::Dwarf32, version: 4, address_size: 4, }; let mut unit = CompilationUnitHeader { header: UnitHeader { encoding, unit_length: 0, debug_abbrev_offset: DebugAbbrevOffset(0), entries_buf: EndianSlice::new(&entries_buf, LittleEndian), }, offset: DebugInfoOffset(0), }; let section = Section::with_endian(Endian::Little).comp_unit(&mut unit); let info_buf = &section.get_contents().unwrap(); let debug_info = DebugInfo::new(info_buf, LittleEndian); let unit = debug_info .units() .next() .expect("should have a unit result") .expect("and it should be ok"); let abbrevs_buf = &entries_cursor_tests_abbrev_buf(); let debug_abbrev = DebugAbbrev::new(abbrevs_buf, LittleEndian); let abbrevs = unit .abbreviations(&debug_abbrev) .expect("Should parse abbreviations"); let mut cursor = unit.entries(&abbrevs); assert_next_entry(&mut cursor, "001"); assert_next_entry(&mut cursor, "002"); { cursor .next_entry() .expect("Should parse next entry") .expect("Should have an entry"); let entry = cursor.current().expect("Should have an entry result"); assert!(entry.attrs().next().is_err()); } assert!(cursor.next_entry().is_err()); assert!(cursor.next_entry().is_err()); }
rust_cleaned_test_functions.jsonl/102065
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 1005 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 28601, 11257, 9078, 1243, 14737, 368, 341, 286, 11506, 35788, 12501, 486, 20599, 921, 286, 1077, 3772, 284, 11113, 486, 4197, 87193, 7, 43231, 486, 38103, 340, 310, 659, 26493, 7, 16, 11, 760, 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_add() { let length1: Length<u8, Mm> = Length::new(250); let length2: Length<u8, Mm> = Length::new(5); let result = length1 + length2; assert_eq!(result.get(), 255); }
rust_cleaned_test_functions.jsonl/50577
{ "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, 2891, 368, 341, 286, 1077, 3084, 16, 25, 17287, 34837, 23, 11, 386, 76, 29, 284, 17287, 486, 931, 7, 17, 20, 15, 317, 286, 1077, 3084, 17, 25, 17287, 34837, 23, 11, 386, 76, 29, 284, 17287...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_cpy_imm() { let mut r = Register::new(); r.set_Y(0x40); cpx_imm(0x50, &mut r); assert_eq!(r.get_status_negative(), true); assert_eq!(r.get_status_carry(), false) }
rust_cleaned_test_functions.jsonl/14205
{ "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, 666, 3288, 71370, 368, 341, 262, 1077, 5206, 435, 284, 8451, 486, 931, 543, 262, 435, 980, 10626, 7, 15, 87, 19, 15, 317, 262, 272, 1767, 71370, 7, 15, 87, 20, 15, 11, 609, 6984, 435, 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_u32_to_bytes() { assert_eq!(util::u32_to_bytes(0x4B92DF71), [0x4B as u8, 0x92 as u8, 0xDF as u8, 0x71 as u8]); }
rust_cleaned_test_functions.jsonl/59878
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 87 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 7300, 18, 17, 2346, 12524, 368, 341, 286, 2060, 10714, 10297, 1314, 486, 84, 18, 17, 2346, 12524, 7, 15, 87, 19, 33, 24, 17, 5262, 22, 16, 701, 508, 15, 87, 19, 33, 438, 575, 23, 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_nargs_decode() { let args: &[IntPtr] = &[1, 2, 3, 4, 5]; let stack = StackedArgs::load(args).unwrap(); let (_, stack): (i32, _) = stack.pop_arg(&TestHost).unwrap(); let (_, stack): (i64, _) = stack.pop_arg(&TestHost).unwrap(); let (c, stack): (i32, _) = stack.pop_arg(&TestHost).unwrap(); let _: StackedArgs<()> = stack; assert_eq!(c, 1); }
rust_cleaned_test_functions.jsonl/31502
{ "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, 1089, 2116, 15227, 368, 341, 262, 1077, 2827, 25, 44590, 74156, 60, 284, 44590, 16, 11, 220, 17, 11, 220, 18, 11, 220, 19, 11, 220, 20, 935, 262, 1077, 5611, 284, 794, 11191, 4117, 486, 1078...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_tiledinputpart_is_valid_level_failure_invalid_level() { let input = MultiPartInputFile::new(&*SRC_IMAGE_PATH, 0, true).unwrap(); let tiled_input_part = super::TiledInputPart::new(&input, 0); let is_valid_level = tiled_input_part.is_valid_level(100, 100); assert_eq!(is_valid_level, false); }
rust_cleaned_test_functions.jsonl/59300
{ "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, 528, 2181, 1355, 4480, 6892, 8337, 8274, 43618, 31433, 8274, 368, 341, 286, 1077, 1946, 284, 17439, 5800, 2505, 1703, 486, 931, 2099, 9, 56017, 19121, 7944, 11, 220, 15, 11, 830, 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...
1
#[test] fn test_filter() { init(); { let input: Vec<char> = "abc def".chars().collect::<Vec<char>>(); let p1 = tag("abc") * elm_ref(' ').map(|e| *e).of_many1() - tag("def"); let p2 = p1.with_filter(|chars| chars.len() > 1); let result: Result<Vec<char>, ParseError<char>> = p2.parse_as_result(&input); assert!(result.is_err()); } { let input: Vec<char> = "abc def".chars().collect::<Vec<char>>(); let p1 = tag("abc") * elm_ref(' ').map(|e| *e).of_many1() - tag("def"); let p2 = p1.with_filter(|chars| chars.len() > 1); let result: Result<Vec<char>, ParseError<char>> = p2.parse_as_result(&input); assert!(result.is_ok()); } }
rust_cleaned_test_functions.jsonl/16812
{ "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, 8727, 368, 341, 262, 2930, 543, 262, 341, 414, 1077, 1946, 25, 11312, 21919, 29, 284, 330, 13683, 707, 3263, 19255, 1005, 17384, 27638, 10050, 21919, 37038, 414, 1077, 281, 16, 284, 4772, 445, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_os_string_reserve() { let mut os_string = OsString::new(); assert_eq!(os_string.capacity(), 0); os_string.reserve(2); assert!(os_string.capacity() >= 2); for _ in 0..16 { os_string.push("a"); } assert!(os_string.capacity() >= 16); os_string.reserve(16); assert!(os_string.capacity() >= 32); os_string.push("a"); os_string.reserve(16); assert!(os_string.capacity() >= 33) }
rust_cleaned_test_functions.jsonl/105021
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 258 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 29387, 3904, 89591, 368, 341, 286, 1077, 5206, 2643, 3904, 284, 15433, 703, 486, 931, 543, 286, 2060, 10714, 10297, 436, 3904, 59168, 1507, 220, 15, 626, 286, 2643, 3904, 48520, 7, 17, 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...
2
#[test] fn test_decode_add_reg_pc() { assert_eq!( decode_16(0x4479), Instruction::ADD_reg { params: Reg3ShiftParams { rd: Reg::R1, rn: Reg::R1, rm: Reg::PC, setflags: SetFlags::False, shift_t: SRType::LSL, shift_n: 0, }, thumb32: false, } ); }
rust_cleaned_test_functions.jsonl/64746
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 277 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 15227, 2891, 4920, 35612, 368, 341, 1066, 262, 2060, 10714, 33673, 286, 16895, 62, 16, 21, 7, 15, 87, 19, 19, 22, 24, 1326, 286, 29051, 486, 15665, 4920, 341, 310, 3628, 25, 3184, 18, 24841, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_bank_hash_internal_state() { let (genesis_config, mint_keypair) = create_genesis_config(2_000); let bank0 = Bank::new(&genesis_config); let bank1 = Bank::new(&genesis_config); let initial_state = bank0.hash_internal_state(); assert_eq!(bank1.hash_internal_state(), initial_state); let pubkey = Pubkey::new_rand(); bank0.transfer(1_000, &mint_keypair, &pubkey).unwrap(); assert_ne!(bank0.hash_internal_state(), initial_state); bank1.transfer(1_000, &mint_keypair, &pubkey).unwrap(); assert_eq!(bank0.hash_internal_state(), bank1.hash_internal_state()); // Checkpointing should always result in a new state let bank2 = new_from_parent(&Arc::new(bank1)); assert_ne!(bank0.hash_internal_state(), bank2.hash_internal_state()); let pubkey2 = Pubkey::new_rand(); info!("transfer 2 {}", pubkey2); bank2.transfer(10, &mint_keypair, &pubkey2).unwrap(); assert!(bank2.verify_hash_internal_state()); }
rust_cleaned_test_functions.jsonl/42398
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 452 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 35733, 8950, 23472, 4387, 368, 341, 286, 1077, 320, 77894, 5332, 11, 28337, 3097, 12670, 8, 284, 1855, 16322, 13774, 5332, 7, 17, 62, 15, 15, 15, 317, 286, 1077, 6073, 15, 284, 8547, 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...
1
#[test] fn test_parsing() { assert!(parse(::std::iter::empty()).is_err()); assert!(parse(vec!["äöüäööüä"].into_iter()).is_err()); assert!(parse(vec!["ZmFpbGVk", "äöüäöüö"].into_iter()).is_err()); assert!(parse(vec!["dHJ1c3RfZG5zIGlzIGF3ZXNvbWU="].into_iter()) .map(|rd| rd == OPENPGPKEY::new(b"trust_dns is awesome".to_vec())) .unwrap_or(false)); assert!(parse(vec!["c2VsZi1wcmFpc2Ugc3Rpbmtz"].into_iter()) .map(|rd| rd == OPENPGPKEY::new(b"self-praise stinks".to_vec())) .unwrap_or(false)); }
rust_cleaned_test_functions.jsonl/12319
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 297 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 620, 28598, 368, 341, 262, 2060, 10297, 6400, 38732, 1834, 486, 2015, 486, 3194, 6011, 285, 9266, 1423, 262, 2060, 10297, 6400, 25592, 0, 1183, 2305, 2956, 2391, 2305, 2956, 2956, 2391, 2305, 5521...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_path_new() { let hex: Vec<u8> = hex::decode(TEST_PATH_BUFFER).expect(""); let path = Path::new(Some(&hex)).unwrap(); assert_eq!(hex::encode_upper(path.as_ref()), TEST_PATH_BUFFER); }
rust_cleaned_test_functions.jsonl/77239
{ "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, 2638, 5921, 368, 341, 286, 1077, 12371, 25, 11312, 34837, 23, 29, 284, 12371, 486, 18196, 50320, 7944, 14394, 568, 17119, 13056, 286, 1077, 1815, 284, 7933, 486, 931, 65405, 2099, 17308, 4579, 154...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_and_with_multiple_not_eq_parse() { let name1 = _random_string(10); let value1 = _random_string(10); let name2 = _random_string(10); let value2 = _random_string(10); let name3 = _random_string(10); let value3 = _random_string(10); let json = format!(r#"{{"$and":[{{"$not":{{"~{}":"{}"}}}},{{"$not":{{"~{}":"{}"}}}},{{"$not":{{"~{}":"{}"}}}}]}}"#, name1, value1, name2, value2, name3, value3, ); let query = parse_from_json(&json).unwrap(); let expected = Operator::And( vec![ Operator::Not( Box::new( Operator::Eq( TagName::PlainTagName(name1.to_vec()), TargetValue::Unencrypted(value1.clone()) ) ) ), Operator::Not( Box::new( Operator::Eq( TagName::PlainTagName(name2.to_vec()), TargetValue::Unencrypted(value2.clone()) ) ) ), Operator::Not( Box::new( Operator::Eq( TagName::PlainTagName(name3.to_vec()), TargetValue::Unencrypted(value3.clone()) ) ) ), ] ); assert_eq!(query, expected); }
rust_cleaned_test_functions.jsonl/11843
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 1074 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 8378, 6615, 45233, 7913, 10714, 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, 317, 286, 1077, 829, 17, 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_handle_admin_commands() { let admin_err = "Admin commands can only be run from admin address".to_string(); let (init_result, mut deps) = init_helper_with_config( vec![InitialBalance { address: HumanAddr("lebron".to_string()), amount: Uint128(5000), }], false, false, true, false, 0, ); assert!( init_result.is_ok(), "Init failed: {}", init_result.err().unwrap() ); let pause_msg = HandleMsg::SetContractStatus { level: ContractStatusLevel::StopAllButRedeems, padding: None, }; let handle_result = handle(&mut deps, mock_env("not_admin", &[]), pause_msg); let error = extract_error_msg(handle_result); assert!(error.contains(&admin_err.clone())); let mint_msg = HandleMsg::AddMinters { minters: vec![HumanAddr("not_admin".to_string())], padding: None, }; let handle_result = handle(&mut deps, mock_env("not_admin", &[]), mint_msg); let error = extract_error_msg(handle_result); assert!(error.contains(&admin_err.clone())); let mint_msg = HandleMsg::RemoveMinters { minters: vec![HumanAddr("admin".to_string())], padding: None, }; let handle_result = handle(&mut deps, mock_env("not_admin", &[]), mint_msg); let error = extract_error_msg(handle_result); assert!(error.contains(&admin_err.clone())); let mint_msg = HandleMsg::SetMinters { minters: vec![HumanAddr("not_admin".to_string())], padding: None, }; let handle_result = handle(&mut deps, mock_env("not_admin", &[]), mint_msg); let error = extract_error_msg(handle_result); assert!(error.contains(&admin_err.clone())); let change_admin_msg = HandleMsg::ChangeAdmin { address: HumanAddr("not_admin".to_string()), padding: None, }; let handle_result = handle(&mut deps, mock_env("not_admin", &[]), change_admin_msg); let error = extract_error_msg(handle_result); assert!(error.contains(&admin_err.clone())); }
rust_cleaned_test_functions.jsonl/69619
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 1089 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 10630, 12207, 44151, 368, 341, 286, 1077, 3986, 9266, 284, 330, 7210, 11293, 646, 1172, 387, 1598, 504, 3986, 2621, 3263, 983, 3904, 543, 286, 1077, 320, 2327, 5287, 11, 5206, 48178, 8, 284, 293...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_sprite_new() { let cols = 6; let rows = 3; let bg = 0; let fg = 1; let pos = Some(engine::Position{ x: 2, y: 3 }); let s: Sprite = Sprite::new(cols, rows, fg, bg, pos); assert_eq!(s.pos.get_x(), 2); assert_eq!(s.pos.get_y(), 3); }
rust_cleaned_test_functions.jsonl/65987
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 181 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 45489, 5921, 368, 341, 286, 1077, 17000, 284, 220, 21, 280, 286, 1077, 6978, 284, 220, 18, 280, 286, 1077, 8951, 284, 220, 15, 280, 286, 1077, 29799, 284, 220, 16, 280, 286, 1077, 1133, 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_new() { println!("objectId:{}", super::ObjectId::new().to_string()); println!("objectId:{}", super::ObjectId::new().to_string()); println!("objectId:{}", super::ObjectId::new().to_string()); println!("objectId:{}", super::ObjectId::new().to_string()); }
rust_cleaned_test_functions.jsonl/101728
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 130 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 5921, 368, 341, 286, 13751, 17223, 88170, 25, 42351, 2256, 486, 75511, 486, 931, 1005, 983, 3904, 1423, 286, 13751, 17223, 88170, 25, 42351, 2256, 486, 75511, 486, 931, 1005, 983, 3904, 1423, 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_restores_scope_after_loops() { use parser::translation_unit; let env = &mut Env::new(); assert!(translation_unit( r" typedef int a; void foo() { for (a a;;) a = a; while (true) {int a;} do { int a; } while(true); _Atomic (a) b; }", env ) .is_ok()); }
rust_cleaned_test_functions.jsonl/107579
{ "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, 32231, 4589, 23199, 19844, 5560, 3721, 368, 341, 262, 990, 6729, 486, 3053, 14832, 280, 262, 1077, 6105, 284, 609, 6984, 37039, 486, 931, 543, 262, 2060, 10297, 3053, 14832, 1006, 286, 435, 698, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_eval_add3() { let mut s = Stack::new(); s.push(Elt::Bool(true)).unwrap(); s.push(Elt::Bool(false)).unwrap(); let res = s.eval(Op::Add); assert!(res.is_err()); if let Err(Error::Type) = res { } else { assert!(false); } }
rust_cleaned_test_functions.jsonl/34519
{ "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, 21296, 2891, 18, 368, 341, 286, 1077, 5206, 274, 284, 14284, 486, 931, 543, 286, 274, 2552, 10722, 4832, 486, 11233, 3715, 4579, 15454, 543, 286, 274, 2552, 10722, 4832, 486, 11233, 3576, 4579, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_ipc_globbing() -> Result<()> { // for side effects init_files(); let glob = "../../examples/aggregate_multiple_files_in_chunks/datasets/*.ipc"; let df = LazyFrame::scan_ipc( glob.into(), ScanArgsIpc { n_rows: None, cache: true, rechunk: false, }, )? .collect()?; assert_eq!(df.shape(), (54, 4)); let cal = df.column("calories")?; assert_eq!(cal.get(0), AnyValue::Int64(45)); assert_eq!(cal.get(53), AnyValue::Int64(194)); Ok(()) }
rust_cleaned_test_functions.jsonl/74080
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 282 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 83806, 95133, 7132, 368, 1464, 5714, 71698, 341, 262, 442, 369, 3108, 6239, 198, 262, 2930, 10931, 543, 262, 1077, 13206, 284, 10208, 51668, 14, 59606, 45233, 10931, 1243, 65470, 3446, 76649, 23540,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_deleted_file_in_worktree() { let names = vec!["file_1.txt", "file_2.txt", "foo.txt"]; let files = names.iter().map(|n| Path::new(n)).collect(); let temp_dir = TempDir::default(); let index = test_repo(&temp_dir, &files); fs::remove_file(temp_dir.join("file_2.txt")).unwrap(); let value = WorkTree::diff_against_index(&temp_dir, index).unwrap(); let entries = vec![StatusEntry { name: "file_2.txt".to_string(), state: Status::Deleted, }]; assert_eq!(value.entries, entries); }
rust_cleaned_test_functions.jsonl/36174
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 282 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 39418, 2458, 1243, 11498, 9344, 368, 341, 286, 1077, 5036, 284, 7486, 0, 1183, 1192, 62, 16, 3909, 497, 330, 1192, 62, 17, 3909, 497, 330, 7975, 3909, 6332, 286, 1077, 3542, 284, 5036, 19471, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_quote() { let cases = vec![ (None, None), (Some(""), Some(r#""""#)), (Some(r#""""#), Some(r#""\"\"""#)), (Some(r#"a"#), Some(r#""a""#)), (Some(r#"3"#), Some(r#""3""#)), (Some(r#"{"a": "b"}"#), Some(r#""{\"a\": \"b\"}""#)), (Some(r#"{"a": "b"}"#), Some(r#""{\"a\": \"b\"}""#)), ( Some(r#"hello,"quoted string",world"#), Some(r#""hello,\"quoted string\",world""#), ), ( Some(r#"hello,"宽字符",world"#), Some(r#""hello,\"宽字符\",world""#), ), ( Some(r#""Invalid Json string is OK"#), Some(r#""\"Invalid Json string\tis OK""#), ), (Some(r#"1\u2232\u22322"#), Some(r#""1\\u2232\\u22322""#)), ( Some("new line \"\r\n\" is ok"), Some(r#""new line \"\r\n\" is ok""#), ), ]; for (arg, expect_output) in cases { let arg = arg.map(Bytes::from); let expect_output = expect_output.map(Bytes::from); let output = RpnFnScalarEvaluator::new() .push_param(arg.clone()) .evaluate(ScalarFuncSig::JsonQuoteSig) .unwrap(); assert_eq!(output, expect_output, "{:?}", arg); } }
rust_cleaned_test_functions.jsonl/95854
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 901 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 9455, 45236, 368, 341, 286, 1077, 5048, 284, 7486, 90515, 310, 320, 4064, 11, 2240, 1326, 310, 320, 8373, 86076, 4329, 2601, 2, 3014, 3014, 2, 6965, 310, 320, 8373, 2601, 2, 3014, 3014, 2, 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_21() { assert_eq!(merge_two_lists( to_list(&[1,2,4]), to_list(&[1,3,4]) ), to_list(&[1,1,2,3,4,4])); }
rust_cleaned_test_functions.jsonl/60435
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 115 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 62, 17, 16, 368, 341, 286, 2060, 10714, 10297, 19052, 23241, 37288, 1006, 310, 311, 2019, 2099, 58, 16, 11, 17, 11, 19, 17036, 310, 311, 2019, 2099, 58, 16, 11, 18, 11, 19, 2546, 286, 6882, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_arithmetic_on_list() { assert::all_true( r#" [1, 2, 3] + [2, 3] == [1, 2, 3, 2, 3] [1, 2, 3] * 3 == [1, 2, 3, 1, 2, 3, 1, 2, 3] "#, ); }
rust_cleaned_test_functions.jsonl/25212
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 125 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 25842, 25922, 4470, 2019, 368, 341, 286, 2060, 486, 541, 16082, 1006, 310, 435, 2, 698, 58, 16, 11, 220, 17, 11, 220, 18, 60, 488, 508, 17, 11, 220, 18, 60, 621, 508, 16, 11, 220, 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_get_voters_by_epoch() { // Create some voters at genesis let (vote_tracker, bank, validator_voting_keypairs, _) = setup(); let last_known_epoch = bank.get_leader_schedule_epoch(bank.slot()); let last_known_slot = bank .epoch_schedule() .get_last_slot_in_epoch(last_known_epoch); // Check we can get the authorized voters for keypairs in &validator_voting_keypairs { assert!(vote_tracker .get_authorized_voter(&keypairs.vote_keypair.pubkey(), last_known_slot) .is_some()); assert!(vote_tracker .get_authorized_voter(&keypairs.vote_keypair.pubkey(), last_known_slot + 1) .is_none()); } // Create the set of relevant voters for the next epoch let new_epoch = last_known_epoch + 1; let first_slot_in_new_epoch = bank.epoch_schedule().get_first_slot_in_epoch(new_epoch); let new_keypairs: Vec<_> = (0..10).map(|_| ValidatorVoteKeypairs::new_rand()).collect(); let new_epoch_authorized_voters: HashMap<_, _> = new_keypairs .iter() .chain(validator_voting_keypairs[0..5].iter()) .map(|keypair| (keypair.vote_keypair.pubkey(), keypair.vote_keypair.pubkey())) .collect(); vote_tracker .epoch_authorized_voters .write() .unwrap() .insert(new_epoch, Arc::new(new_epoch_authorized_voters)); // These keypairs made it into the new epoch for keypairs in new_keypairs .iter() .chain(validator_voting_keypairs[0..5].iter()) { assert!(vote_tracker .get_authorized_voter(&keypairs.vote_keypair.pubkey(), first_slot_in_new_epoch) .is_some()); } // These keypairs were not refreshed in new epoch for keypairs in validator_voting_keypairs[5..10].iter() { assert!(vote_tracker .get_authorized_voter(&keypairs.vote_keypair.pubkey(), first_slot_in_new_epoch) .is_none()); } }
rust_cleaned_test_functions.jsonl/32279
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 1084 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 3062, 2273, 39796, 3710, 20682, 368, 341, 286, 442, 4230, 1045, 11707, 518, 59366, 198, 286, 1077, 320, 29358, 50264, 11, 6073, 11, 22935, 2273, 11519, 3097, 77256, 11, 27439, 284, 6505, 543, 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...
4
#[test] fn test_pay_with_remark_works() { new_test_ext().execute_with(|| { let creator_initial_balance = 100; let payment_amount = 40; let expected_incentive_amount = payment_amount / INCENTIVE_PERCENTAGE as u128; // should be able to create a payment with available balance assert_ok!(Payment::pay( Origin::signed(PAYMENT_CREATOR), PAYMENT_RECIPENT, CURRENCY_ID, payment_amount, Some(vec![1u8; 10].try_into().unwrap()) )); assert_eq!( PaymentStore::<Test>::get(PAYMENT_CREATOR, PAYMENT_RECIPENT), Some(PaymentDetail { asset: CURRENCY_ID, amount: payment_amount, incentive_amount: expected_incentive_amount, state: PaymentState::Created, resolver_account: RESOLVER_ACCOUNT, fee_detail: Some((FEE_RECIPIENT_ACCOUNT, 0)), }) ); // the payment amount should be reserved correctly // the amount + incentive should be removed from the sender account assert_eq!( Tokens::free_balance(CURRENCY_ID, &PAYMENT_CREATOR), creator_initial_balance - payment_amount - expected_incentive_amount ); // the incentive amount should be reserved in the sender account assert_eq!( Tokens::total_balance(CURRENCY_ID, &PAYMENT_CREATOR), creator_initial_balance - payment_amount ); assert_eq!(Tokens::free_balance(CURRENCY_ID, &PAYMENT_RECIPENT), 0); // the transferred amount should be reserved in the recipent account assert_eq!(Tokens::total_balance(CURRENCY_ID, &PAYMENT_RECIPENT), payment_amount); // the payment should not be overwritten assert_noop!( Payment::pay( Origin::signed(PAYMENT_CREATOR), PAYMENT_RECIPENT, CURRENCY_ID, payment_amount, None ), crate::Error::<Test>::PaymentAlreadyInProcess ); assert_eq!( last_event(), crate::Event::<Test>::PaymentCreated { from: PAYMENT_CREATOR, asset: CURRENCY_ID, amount: payment_amount, remark: Some(vec![1u8; 10].try_into().unwrap()) } .into() ); }); }
rust_cleaned_test_functions.jsonl/111988
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 787 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 28925, 6615, 1288, 3987, 11498, 82, 368, 341, 8638, 4452, 9927, 1005, 10257, 6615, 79453, 341, 197, 10217, 19919, 15809, 29396, 284, 220, 16, 15, 15, 280, 197, 10217, 8160, 13471, 284, 220, 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...
2
#[test] fn test_is_next() { let mut ll = LinkedList::<u8>::with_capacity(4); let hnd1 = ll.push_tail(1); let hnd2 = ll.push_tail(2); let hnd3 = ll.push_tail(3); ll.pop_tail(); assert_eq!(ll.is_next(&hnd1, &hnd1), Some(false)); assert_eq!(ll.is_next(&hnd1, &hnd2), Some(false)); assert_eq!(ll.is_next(&hnd2, &hnd1), Some(true)); assert_eq!(ll.is_next(&hnd2, &hnd3), None); assert_eq!(ll.is_next(&hnd1, &hnd3), None); assert_eq!(ll.is_next(&hnd3, &hnd3), None); }
rust_cleaned_test_functions.jsonl/59900
{ "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, 6892, 11257, 368, 341, 286, 1077, 5206, 9323, 284, 22917, 27638, 84, 23, 6831, 4197, 35603, 7, 19, 317, 286, 1077, 305, 303, 16, 284, 9323, 2552, 35471, 7, 16, 317, 286, 1077, 305, 303, 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_rts() { let mut cpu = mock_cpu(&[0x60]); cpu.push_word(0xBE); cpu.push_word(0xEE); cpu.step(None); assert!(cpu.PC == 0xbeef, "expected 0xbeef, got {:#x}", cpu.PC); }
rust_cleaned_test_functions.jsonl/95011
{ "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, 1710, 2576, 368, 341, 286, 1077, 5206, 17319, 284, 7860, 21795, 2099, 58, 15, 87, 21, 15, 2558, 286, 17319, 2552, 13533, 7, 15, 85449, 317, 286, 17319, 2552, 13533, 7, 15, 77124, 626, 286, 173...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_arguments_clangmodules() { assert_eq!(CompilerArguments::CannotCache("-fcxx-modules", None), _parse_arguments(&stringvec!["-c", "foo.c", "-fcxx-modules", "-o", "foo.o"])); assert_eq!(CompilerArguments::CannotCache("-fmodules", None), _parse_arguments(&stringvec!["-c", "foo.c", "-fmodules", "-o", "foo.o"])); }
rust_cleaned_test_functions.jsonl/57815
{ "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, 21039, 43433, 6794, 524, 11525, 368, 341, 286, 2060, 10714, 10297, 38406, 19139, 486, 17444, 8233, 13645, 8316, 4146, 61079, 497, 2240, 1326, 4293, 716, 6400, 43433, 2099, 917, 4083, 0, 1183, 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
#[test] fn test_touch_reference() { let (at, mut ucmd) = at_and_ucmd!(); let file_a = "test_touch_reference_a"; let file_b = "test_touch_reference_b"; let start_of_year = str_to_filetime("%Y%m%d%H%M", "201501010000"); at.touch(file_a); set_file_times(&at, file_a, start_of_year, start_of_year); assert!(at.file_exists(file_a)); ucmd.args(&["-r", file_a, file_b]).succeeds().no_stderr(); assert!(at.file_exists(file_b)); let (atime, mtime) = get_file_times(&at, file_b); assert_eq!(atime, mtime); assert_eq!(atime, start_of_year); assert_eq!(mtime, start_of_year); }
rust_cleaned_test_functions.jsonl/41031
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 297 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 60840, 25433, 368, 341, 262, 1077, 320, 266, 11, 5206, 575, 8710, 8, 284, 518, 8378, 68887, 2277, 0, 543, 262, 1077, 1034, 4306, 284, 330, 1944, 60840, 25433, 4306, 876, 262, 1077, 1034, 880, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_derive_01() { let password = [ 0xa3, 0x47, 0xae, 0x92, 0xbc, 0xe9, 0xf8, 0x0f, 0x6f, 0x59, 0x5a, 0x44, 0x80, 0xfc, 0x9c, 0x2f, 0xe7, 0xe7, 0xd7, 0x14, 0x8d, 0x37, 0x1e, 0x94, 0x87, 0xd7, 0x5f, 0x5c, 0x23, 0x00, 0x8f, 0xfa, 0xe0, 0x65, 0x57, 0x7a, 0x92, 0x8f, 0xeb, 0xd9, 0xb1, 0x97, 0x3a, 0x5a, 0x95, 0x07, 0x3a, 0xcd, 0xbe, 0xb6, 0xa0, 0x30, 0xcf, 0xc0, 0xd7, 0x9c, 0xaa, 0x2d, 0xc5, 0xcd, 0x01, 0x1c, 0xef, 0x02, 0xc0, 0x8d, 0xa2, 0x32, 0xd7, 0x6d, 0x52, 0xdf, 0xbc, 0xa3, 0x8c, 0xa8, 0xdc, 0xbd, 0x66, 0x5b, 0x17, 0xd1, 0x66, 0x5f, 0x7c, 0xf5, 0xfe, 0x59, 0x77, 0x2e, 0xc9, 0x09, 0x73, 0x3b, 0x24, 0xde, 0x97, 0xd6, 0xf5, 0x8d, 0x22, 0x0b, 0x20, 0xc6, 0x0d, 0x7c, 0x07, 0xec, 0x1f, 0xd9, 0x3c, 0x52, 0xc3, 0x10, 0x20, 0x30, 0x0c, 0x6c, 0x1f, 0xac, 0xd7, 0x79, 0x37, 0xa5, 0x97, 0xc7, 0xa6, ]; let salt = [ 0x55, 0x41, 0xfb, 0xc9, 0x95, 0xd5, 0xc1, 0x97, 0xba, 0x29, 0x03, 0x46, 0xd2, 0xc5, 0x59, 0xde, ]; let expected = [ 0x18, 0xac, 0xec, 0x5d, 0x65, 0x07, 0x73, 0x9f, 0x20, 0x3d, 0x1f, 0x5d, 0x9f, 0x1d, 0x86, 0x2f, 0x7c, 0x2c, 0xda, 0xc4, 0xf1, 0x9d, 0x2b, 0xdf, 0xf6, 0x44, 0x87, 0xe6, 0x0d, 0x96, 0x9e, 0x3c, 0xed, 0x61, 0x53, 0x37, 0xb9, 0xee, 0xc6, 0xac, 0x44, 0x61, 0xc6, 0xca, 0x07, 0xf0, 0x93, 0x97, 0x41, 0xe5, 0x7c, 0x24, 0xd0, 0x00, 0x5c, 0x7e, 0xa1, 0x71, 0xa0, 0xee, 0x1e, 0x73, 0x48, 0x24, 0x9d, 0x13, 0x5b, 0x38, 0xf2, 0x22, 0xe4, 0xda, 0xd7, 0xb9, 0xa0, 0x33, 0xed, 0x83, 0xf5, 0xca, 0x27, 0x27, 0x73, 0x93, 0xe3, 0x16, 0x58, 0x20, 0x33, 0xc7, 0x4a, 0xff, 0xe2, 0x56, 0x6a, 0x2b, 0xea, 0x47, 0xf9, 0x1f, 0x0f, 0xd9, 0xfe, 0x49, 0xec, 0xe7, 0xe1, 0xf7, 0x9f, 0x3a, 0xd6, 0xe9, 0xb2, 0x3e, 0x02, 0x77, 0xc8, 0xec, 0xc4, 0xb3, 0x13, 0x22, 0x57, 0x48, 0xdd, 0x2a, 0x80, 0xf5, 0x67, 0x95, 0x34, 0xa0, 0x70, 0x0e, 0x24, 0x6a, 0x79, 0xa4, 0x9b, 0x3f, 0x74, 0xeb, 0x89, 0xec, 0x62, 0x05, 0xfe, 0x1e, 0xeb, 0x94, 0x1c, 0x73, 0xb1, 0xfc, 0xf1, ]; let result = run_derive_key_test(&password, salt, &expected, 155, 5, 7256678); assert!(result.is_ok()); }
rust_cleaned_test_functions.jsonl/134462
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 1691 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 35345, 533, 62, 15, 16, 368, 341, 286, 1077, 3552, 284, 2278, 310, 220, 15, 9591, 18, 11, 220, 15, 87, 19, 22, 11, 220, 15, 57052, 11, 220, 15, 87, 24, 17, 11, 220, 15, 43416, 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_tuple_list_as_map() { let ip = "1.2.3.4".parse().unwrap(); let ip2 = "255.255.255.255".parse().unwrap(); #[serde_as] #[derive(Debug, Serialize, Deserialize, PartialEq)] struct SH(#[serde_as(as = "HashMap<DisplayFromStr, DisplayFromStr>")] Vec<(u32, IpAddr)>); is_equal( SH(vec![(1, ip), (10, ip), (200, ip2)]), expect![[r#" { "1": "1.2.3.4", "10": "1.2.3.4", "200": "255.255.255.255" }"#]], ); #[serde_as] #[derive(Debug, Serialize, Deserialize, PartialEq)] struct SB(#[serde_as(as = "BTreeMap<DisplayFromStr, DisplayFromStr>")] Vec<(u32, IpAddr)>); is_equal( SB(vec![(1, ip), (10, ip), (200, ip2)]), expect![[r#" { "1": "1.2.3.4", "10": "1.2.3.4", "200": "255.255.255.255" }"#]], ); #[serde_as] #[derive(Debug, Serialize, Deserialize, PartialEq)] struct SD(#[serde_as(as = "BTreeMap<DisplayFromStr, DisplayFromStr>")] VecDeque<(u32, IpAddr)>); is_equal( SD(vec![(1, ip), (10, ip), (200, ip2)].into()), expect![[r#" { "1": "1.2.3.4", "10": "1.2.3.4", "200": "255.255.255.255" }"#]], ); #[serde_as] #[derive(Debug, Serialize, Deserialize, PartialEq)] struct Sll( #[serde_as(as = "HashMap<DisplayFromStr, DisplayFromStr>")] LinkedList<(u32, IpAddr)>, ); is_equal( Sll(vec![(1, ip), (10, ip), (200, ip2)].into_iter().collect()), expect![[r#" { "1": "1.2.3.4", "10": "1.2.3.4", "200": "255.255.255.255" }"#]], ); #[serde_as] #[derive(Debug, Serialize, Deserialize, PartialEq)] struct SO(#[serde_as(as = "HashMap<DisplayFromStr, DisplayFromStr>")] Option<(u32, IpAddr)>); is_equal( SO(Some((1, ip))), expect![[r#" { "1": "1.2.3.4" }"#]], ); is_equal(SO(None), expect![[r#"{}"#]]); }
rust_cleaned_test_functions.jsonl/86188
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 1260 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 21773, 2019, 11898, 5376, 368, 341, 262, 1077, 5997, 284, 330, 16, 13, 17, 13, 18, 13, 19, 3263, 6400, 1005, 15454, 543, 262, 1077, 5997, 17, 284, 330, 17, 20, 20, 13, 17, 20, 20, 13, 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_bpchar_params() { let mut runtime = Runtime::new().unwrap(); let handshake = connect("user=postgres"); let (mut client, connection) = runtime.block_on(handshake).unwrap(); let connection = connection.map_err(|e| panic!("{}", e)); runtime.spawn(connection); let batch = client .simple_query( "CREATE TEMPORARY TABLE foo ( id SERIAL PRIMARY KEY, b CHAR(5) )", ) .for_each(|_| Ok(())); runtime.block_on(batch).unwrap(); let prepare = client.prepare("INSERT INTO foo (b) VALUES ($1), ($2), ($3)"); let stmt = runtime.block_on(prepare).unwrap(); let execute = client.execute(&stmt, &[&"12345", &"123", &None::<&'static str>]); runtime.block_on(execute).unwrap(); let prepare = client.prepare("SELECT b FROM foo ORDER BY id"); let stmt = runtime.block_on(prepare).unwrap(); let query = client.query(&stmt, &[]).collect(); let res = runtime.block_on(query).unwrap(); assert_eq!( vec![Some("12345".to_owned()), Some("123 ".to_owned()), None], res.iter().map(|row| row.get(0)).collect::<Vec<_>>() ); }
rust_cleaned_test_functions.jsonl/127913
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 512 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 57106, 1762, 6745, 368, 341, 262, 1077, 5206, 15592, 284, 10954, 486, 931, 1005, 15454, 1428, 262, 1077, 57020, 284, 4564, 445, 872, 28, 43070, 797, 262, 1077, 320, 6984, 2943, 11, 3633, 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...
1
#[test] fn test_queue_propose_message_from_next_height() { let sandbox = timestamping_sandbox(); let sandbox_state = SandboxState::new(); // get some tx let tx = gen_timestamping_tx(); // TODO: this commented code is saved because it may be used later let block_at_first_height = BlockBuilder::new(&sandbox) .with_proposer_id(VALIDATOR_0) .with_tx_hash(&tx.hash()) .with_state_hash(&sandbox.compute_state_hash(&[tx.raw().clone()])) .build(); let future_propose = Propose::new(VALIDATOR_0, HEIGHT_TWO, ROUND_TWO, &block_at_first_height.clone().hash(), &[], // there are no transactions in future propose sandbox.s(VALIDATOR_0)); sandbox.recv(&future_propose); add_one_height_with_transactions(&sandbox, &sandbox_state, &[tx.raw().clone()]); info!("last_block={:#?}, hash={:?}", sandbox.last_block(), sandbox.last_block().hash()); info!("proposed_block={:#?}, hash={:?}", block_at_first_height, block_at_first_height.hash()); sandbox.add_time(Duration::from_millis(sandbox.round_timeout())); sandbox.add_time(Duration::from_millis(0)); }
rust_cleaned_test_functions.jsonl/8880
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 684 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 10841, 21663, 960, 6462, 5673, 11257, 9561, 368, 1476, 262, 1077, 42754, 284, 11441, 287, 643, 31536, 543, 262, 1077, 42754, 4387, 284, 96860, 1397, 486, 931, 1428, 262, 442, 633, 1045, 9854, 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_short_ssh_github_clone_url() { let url = "git@github.com:user/repo.git"; assert_eq!( Repo::parse(url).get_clone_url(), "git@github.com:user/repo.git" ); }
rust_cleaned_test_functions.jsonl/31157
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 128 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 16673, 82805, 1889, 3827, 54742, 2903, 368, 341, 286, 1077, 2515, 284, 330, 12882, 31, 5204, 905, 64280, 10758, 5368, 32799, 3302, 286, 2060, 10714, 33673, 310, 71509, 486, 6400, 6522, 568, 455, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_dim_compact_bare_duplicate_definition() { let program = r#" DIM A DIM A "#; assert_linter_err!(program, QError::DuplicateDefinition, 3, 17); }
rust_cleaned_test_functions.jsonl/122458
{ "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, 10791, 18177, 531, 880, 546, 70434, 31698, 368, 341, 262, 1077, 2025, 284, 435, 2, 698, 310, 50859, 362, 198, 310, 50859, 362, 198, 310, 5869, 280, 262, 2060, 907, 2245, 9266, 10297, 14906, 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
#[test] fn test_numcpus() { let res = parse_cfg::<(_, nom::error::ErrorKind)>( "cfg(all(any(target_arch = \"x86_64\", target_arch = \"aarch64\"), target_os = \"hermit\"))", ); println!("res = {:?}", res); assert_eq!( res, Ok(( "", All(vec![ Any(vec![ Value { key: "target_arch", value: "x86_64" }, Value { key: "target_arch", value: "aarch64" } ]), Value { key: "target_os", value: "hermit" } ]) )) ) }
rust_cleaned_test_functions.jsonl/50605
{ "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, 4273, 4672, 355, 368, 341, 310, 1077, 592, 284, 4715, 18343, 27638, 41117, 9662, 486, 841, 486, 1454, 10629, 16018, 1006, 394, 330, 14072, 20388, 40268, 8637, 34330, 284, 7245, 87, 23, 21, 62, 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_build() { let actual = LogReopenCommand::new().build(); let expected = (LogReopen, vec![]); assert_eq!(expected, actual); }
rust_cleaned_test_functions.jsonl/75910
{ "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, 20801, 368, 341, 286, 1077, 5042, 284, 2835, 693, 2508, 4062, 486, 931, 1005, 5834, 543, 286, 1077, 3601, 284, 320, 2201, 693, 2508, 11, 7486, 0, 56703, 286, 2060, 10714, 10297, 7325, 11, 5042, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_fuzzing_counterexamples() { let compiled = COMPILED.find("GreeterTest").expect("could not find contract"); let (_, code, _) = compiled.into_parts_or_default(); let mut libs = vec![]; let runner = runner(compiled.abi.as_ref().unwrap(), code, &mut libs); let mut cfg = FuzzConfig::default(); cfg.failure_persistence = None; let fuzzer = TestRunner::new(cfg); let results = runner.run_tests(&Filter::new("testFuzz.*", ".*"), Some(fuzzer), None).unwrap(); for (_, res) in results { assert!(!res.success); assert!(res.counterexample.is_some()); } }
rust_cleaned_test_functions.jsonl/50719
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 369 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 761, 8889, 287, 15730, 51668, 368, 341, 310, 1077, 19697, 284, 7682, 1893, 13639, 2658, 445, 64747, 1404, 2271, 1827, 17119, 445, 28077, 537, 1477, 5116, 797, 310, 1077, 39464, 2038, 11, 27439, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_method_return_nonpod_by_value() { let cxx = indoc! {" Anna Bob::get_anna() const { Anna a; a.a = 12; return a; } "}; let hdr = indoc! {" #include <cstdint> #include <string> struct Anna { uint32_t a; std::string b; }; struct Bob { public: uint32_t a; uint32_t b; Anna get_anna() const; }; "}; let rs = quote! { let b = ffi::Bob { a: 12, b: 13 }; let a = b.get_anna(); assert!(!a.is_null()); }; run_test(cxx, hdr, rs, &["Anna"], &["Bob"]); }
rust_cleaned_test_functions.jsonl/9775
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 405 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 9032, 12511, 21637, 39073, 3710, 3142, 368, 341, 262, 1077, 272, 4146, 284, 1257, 509, 0, 314, 698, 286, 23223, 14261, 486, 455, 62, 12642, 368, 733, 341, 310, 23223, 264, 280, 310, 264, 5849, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_identifier() { // valid assert!(Token::from_str0("`SELECT`").is_identifier()); assert!(Token::from_str0("xxx").is_identifier()); assert!(Token::from_str0("_xxx").is_identifier()); assert!(Token::from_str0("__").is_identifier()); assert!(Token::from_str0("x1").is_identifier()); // invalid assert!(!Token::from_str0("SELECT").is_identifier()); assert!(!Token::from_str0("select").is_identifier()); assert!(!Token::from_str0("999").is_identifier()); assert!(!Token::from_str0("").is_identifier()); }
rust_cleaned_test_functions.jsonl/67671
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 230 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 6892, 33176, 368, 341, 262, 442, 2697, 198, 262, 2060, 10297, 3323, 486, 1499, 2895, 15, 93314, 4858, 63, 1827, 285, 33176, 1423, 262, 2060, 10297, 3323, 486, 1499, 2895, 15, 445, 24048, 1827, 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_move_up_down_line_mode() { let fj = parse_top_level_json(OBJECT.to_owned()).unwrap(); let mut viewer = JsonViewer::new(fj, Mode::Line); assert_movements( &mut viewer, vec![(Action::MoveDown(1), 1), (Action::MoveDown(2), 3)], ); viewer.flatjson.collapse(6); viewer.focused_row = 6; assert_movements( &mut viewer, vec![ (Action::MoveDown(1), 11), (Action::MoveDown(1), 12), (Action::MoveDown(1), 12), ], ); assert_movements( &mut viewer, vec![ (Action::MoveUp(2), 6), (Action::MoveUp(1), 5), (Action::MoveUp(5), 0), (Action::MoveUp(2), 0), ], ); viewer.flatjson.collapse(0); assert_movements( &mut viewer, vec![(Action::MoveUp(1), 0), (Action::MoveDown(1), 0)], ); }
rust_cleaned_test_functions.jsonl/41760
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 601 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 17134, 8237, 13998, 6528, 7302, 368, 341, 286, 1077, 75371, 284, 4715, 10426, 8274, 9455, 19238, 10467, 2389, 51973, 6011, 15454, 543, 286, 1077, 5206, 25708, 284, 8308, 28271, 486, 931, 955, 73, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_metadata_compressor_lz4() { let temp = TempFile::new().unwrap(); let mut w = OpenOptions::new() .read(true) .write(true) .open(temp.as_path()) .unwrap(); let r = OpenOptions::new() .read(true) .write(false) .open(temp.as_path()) .unwrap(); let chunks = vec![ BlobChunkInfoOndisk { uncomp_info: 0x01ff_f000_0000_0000, comp_info: 0x00ff_f000_0000_0000, }, BlobChunkInfoOndisk { uncomp_info: 0x01ff_f000_0010_0000, comp_info: 0x00ff_f000_0010_0000, }, ]; let data = unsafe { std::slice::from_raw_parts( chunks.as_ptr() as *const u8, chunks.len() * std::mem::size_of::<BlobChunkInfoOndisk>(), ) }; let (buf, compressed) = compress::compress(data, compress::Algorithm::Lz4Block).unwrap(); assert_eq!(compressed, true); let pos = 0; w.write_all(&buf).unwrap(); let compressed_size = buf.len(); let uncompressed_size = data.len(); let mut blob_info = BlobInfo::new( 0, "dummy".to_string(), 0, 0, RAFS_MAX_CHUNK_SIZE as u32, 0, BlobFeatures::default(), ); blob_info.set_blob_meta_info( 0, pos, compressed_size as u64, uncompressed_size as u64, compress::Algorithm::Lz4Block as u32, ); let mut buffer = Vec::with_capacity(uncompressed_size); unsafe { buffer.set_len(uncompressed_size) }; let reader: Arc<dyn BlobReader> = Arc::new(DummyBlobReader { metrics: BackendMetrics::new("dummy", "localfs"), file: r, }); BlobMetaInfo::read_metadata(&blob_info, &reader, &mut buffer).unwrap(); assert_eq!(buffer, data); }
rust_cleaned_test_functions.jsonl/37905
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 1140 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 6443, 22220, 2965, 56220, 907, 89, 19, 368, 341, 286, 1077, 2730, 284, 19944, 1703, 486, 931, 1005, 15454, 543, 286, 1077, 5206, 289, 284, 5264, 3798, 486, 931, 741, 310, 659, 878, 3715, 340, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_complete_sig_r1_wrong_paillier() { let paillier_sk = DecryptionKey::from(MinimalDecryptionKey{p: BigInt::from_hex("d3542d07cda6034cf8568b68d69f07b716c98dcc466d7fb89d2a40db4addfe1402ac6007b609734c80fa4dd24f005cc2d404651f724561391fd2c714c054c5ecb98c0d367d5d99cddbd788489151daa247feef546ba173db02576793f2386c89a78e1cf0b1b5e3882efb709663c8fb50f3b973e87447bc0a473b792eeb9720ef").unwrap(), q: BigInt::from_hex("bf9f1abdcfd5f3e30a609ad469637eeadf068f67735c319cd0bfe3cb7ed915d93c33c77078762c3deab68fd66a46903a3241f84ccf827ac27faa339d12f4cf818732220b2a899660765a8554d8bc6490bc7490b7874fe1651dccd25b74bcdb5481e1d09bfe3ec6143c2f9bb2cf3658d514fc8c1e48a8e095b8a0f9fe94891f67").unwrap()}); let presig = BigInt::from_hex("4a4f82ec76b17ddfc10b15878713cc31fe914674a36b834da70215670d19997a56db6fa8b38fbdb2672a73aafcb4ba7162f35b1ccc0474622f2d2a50406fcd8cfbbca0ad6adaf3bd6c8d574393a8cca548e88f93383d426bb634a390f21014562ca45c2b739b270e65760ef43fc28fa207bfe6e7e159f8f943e66606037814586d512057c0036e98e6b9e2432723c9b86eb6ecc43def1fd8d608ba8334872be86659690bb10e7da72dcc18df5f316b2e6fc0ff37b351cca3510f48b50053c7de638ebbded1a2bc34ff130ad8df98e7353fb6c9be6893bd6d6fa1b07eb79a0bf815fe6e611ec7c99564b7acca2d7266d7de64b3e7fb4911638c0cda8b5c7896f261971e7a6bb04bca5ff6bb80153aed189d62d899d88727778b12e6d9b6d49b0af2dd5bbcc57a8950cd02a5f993bebcf85eeb3ca36179166b52a188870777dcb6d67d707c07f013c035e33c49e76b91389dabc681d04928bfc27be1acea29c61087caf6f8675c1ef572275d5e724e8ed7dea616d2058ba07a7f261622a7479c2bb63bea79956f7b84202e740a1ff0ddaff3500dfa6ab2dfafd2aa0a3a20629f71ebdeb1328d71ecb4301a95f98ee3b82c87eb286138f30f947ccaa9a1bf042ed829b89550455e2fae3fbc8d7803dc53e6565dc3999d2c739c568e80175e15e4d7e5679cce42fd86f44c7b5c87cccceb7a4f8cbda1ce87f3e3f38beb516f2cf737").unwrap(); let r = BigInt::from_hex("030a3ec2711ae5dc9e71711dc4d6bf2beb755be5639a9ce1854e258c4c44921fff") .unwrap(); let k = BigInt::from_hex("e1d1318d8b96ed598ce80f8fb9197327bca23f7db51021a6c5cfb8b01851b2ff") .unwrap(); let curve = Curve::Secp256r1; let pk = publickey_from_secretkey( &BigInt::from_hex("4794853ce9e44b4c7a69c6a3b87db077f8f910f244bb6b966ba5fed83c9756f1") .unwrap(), curve, ) .unwrap(); let msg_hash = BigInt::from_hex("000000000000000fffffffffffffffffff00000000000000ffffffffff000000") .unwrap(); complete_sig(&paillier_sk, &presig, &r, &k, curve, &pk, &msg_hash).unwrap(); }
rust_cleaned_test_functions.jsonl/62611
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 1483 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 27675, 29252, 1710, 16, 75198, 55475, 483, 1268, 368, 341, 286, 1077, 7106, 483, 1268, 33811, 284, 3714, 15597, 1592, 486, 1499, 3189, 258, 2861, 4900, 15597, 1592, 90, 79, 25, 62608, 486, 1499, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_meta_can_sign() { use ed25519; use chrono::Timelike; use chrono::UTC; use chrono::duration::Duration; use meta::Meta; use certificate::Certificate; use root_validator::RootValidator; use revoker::NoRevoker; let (mpk, msk) = ed25519::generate_keypair(); let cv = RootValidator::new(&mpk, NoRevoker); let mut meta = Meta::new_empty(); let expires = UTC::now() .checked_add(Duration::days(90)) .expect("Failed to add 90 days to expiration date.") .with_nanosecond(0) .unwrap(); { let mut cert = Certificate::generate_random(meta.clone(), expires.clone()); cert.sign_with_master(&msk); assert_eq!(cv.is_valid(&cert).is_ok(), true); let mut cert_child = Certificate::generate_random(meta.clone(), expires.clone()); cert.sign_certificate(&mut cert_child).expect("Failed to sign certificate"); assert_eq!(cv.is_valid(&cert_child).is_ok(), false); } { meta.set("use-for", "[\"edcert.sign\"]"); let mut cert = Certificate::generate_random(meta.clone(), expires.clone()); cert.sign_with_master(&msk); assert_eq!(cv.is_valid(&cert).is_ok(), true); let mut cert_child = Certificate::generate_random(meta.clone(), expires.clone()); cert.sign_certificate(&mut cert_child).expect("Failed to sign certificate"); assert_eq!(cv.is_valid(&cert_child).is_ok(), true); } }
rust_cleaned_test_functions.jsonl/112012
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 615 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 13381, 27421, 11172, 368, 341, 262, 990, 1578, 17, 20, 20, 16, 24, 280, 262, 990, 80372, 486, 20217, 301, 2970, 280, 262, 990, 80372, 486, 21183, 280, 262, 990, 80372, 486, 17021, 486, 12945, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_assemble_mirrored() -> Result<()> { // Test image assembly with mirroring. let mut image = ImageAssembler::with_params(20, true); image.parse(&[ testdata!("hello.txt").to_str().unwrap(), testdata!("world.txt").to_str().unwrap(), ])?; let data = image.assemble()?; assert_eq!(data, b"HelloWorldHelloWorld"); Ok(()) }
rust_cleaned_test_functions.jsonl/12332
{ "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, 11898, 15790, 717, 404, 47643, 368, 1464, 5714, 71698, 341, 286, 442, 3393, 2168, 14614, 448, 8652, 89579, 624, 286, 1077, 5206, 2168, 284, 4654, 77858, 486, 4197, 6745, 7, 17, 15, 11, 830, 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...
3
#[test] fn test_config_without_options() { let query = "query"; let file = File::open("./test-data/test.txt").unwrap(); let config = Config::new(None, query, &file); assert_eq!(config.is_ok(), true); let config = config.unwrap(); let options = config.get_options(); assert_eq!(options.is_none(), true); assert_eq!(config.get_query(), query); assert_eq!( config.get_file().metadata().unwrap().len(), file.metadata().unwrap().len() ); }
rust_cleaned_test_functions.jsonl/63337
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 254 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 5332, 39904, 8743, 368, 341, 286, 1077, 3239, 284, 330, 1631, 876, 286, 1077, 1034, 284, 2887, 486, 2508, 13988, 1944, 13945, 12697, 3909, 1827, 15454, 543, 286, 1077, 2193, 284, 5532, 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...
1
#[test] fn test_dimension_length() { assert_eq!(get_dimension(b"A1:Z99").unwrap().len(), 2_574); assert_eq!( get_dimension(b"A1:XFD1048576").unwrap().len(), 17_179_869_184 ); }
rust_cleaned_test_functions.jsonl/71170
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 109 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 49619, 5118, 368, 341, 262, 2060, 10714, 10297, 455, 49619, 1883, 29133, 16, 25, 57, 24, 24, 1827, 15454, 1005, 2892, 1507, 220, 17, 62, 20, 22, 19, 317, 262, 2060, 10714, 33673, 286, 633, 496...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_raw_node_step() { let l = default_logger(); for msg_t in MessageType::values() { let s = new_storage(); s.wl().set_hardstate(hard_state(1, 1, 0)); // Append an empty entry to make sure the non-local messages (like s.wl().append(&[new_entry(1, 1, None)]).unwrap(); s.wl().apply_snapshot(new_snapshot(1, 1, vec![1])).unwrap(); let mut raw_node = new_raw_node(1, vec![1], 10, 1, new_storage(), &l); let res = raw_node.step(new_message(0, 0, *msg_t, 0)); // LocalMsg should be ignored. if raw_node::is_local_msg(*msg_t) { assert_eq!(res, Err(Error::StepLocalMsg), "{:?}", msg_t); } } }
rust_cleaned_test_functions.jsonl/33963
{ "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, 16067, 5084, 11946, 368, 341, 262, 1077, 326, 284, 1638, 27413, 543, 262, 369, 3750, 528, 304, 62336, 486, 3661, 368, 341, 286, 1077, 274, 284, 501, 23310, 543, 286, 274, 1418, 75, 1005, 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...
3
#[test] fn test_vlq() { let mut pos = 0; let examples = [ 0b0000_0000, 0b0000_0010, 0b0111_1111, 0b1000_0000, 0b0000_0000, 0b1111_1111, 0b0111_1111, 0b1000_0000, 0b1000_0000, 0b0000_0000, 0b1111_1111, 0b1111_1111, 0b0111_1111, 0b1000_0000, 0b1000_0000, 0b1000_0000, 0b0000_0000, 0b1111_1111, 0b1111_1111, 0b1111_1111, 0b0111_1111, 0b1111_1111, 0b1111_1111, 0b1111_1111, 0b1111_1111, 0b0111_1111, ]; let targets = [ (0, 1), (2, 1), (127, 1), (128, 2), (16511, 2), (16512, 3), (2113663, 3), (2113664, 4), (270549119, 4), ]; let mut buf = [0u8; 4]; for &(val, size) in targets.iter() { let prev_pos = pos; assert_eq!(read_vlq(&examples, &mut pos), Ok(val)); assert_eq!(pos - prev_pos, size); assert_eq!(encode_vlq(val, &mut buf), &examples[prev_pos..pos]); } // only VLQ values of up to 4 bytes are supported assert_eq!(read_vlq(&examples, &mut pos), Err(Error::InvalidVlq)); assert_eq!(pos, 25); }
rust_cleaned_test_functions.jsonl/1693
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 768 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 2273, 75, 80, 368, 341, 286, 1077, 5206, 1133, 284, 220, 15, 280, 286, 1077, 10295, 284, 2278, 310, 220, 15, 65, 15, 15, 15, 15, 62, 15, 15, 15, 15, 11, 715, 310, 220, 15, 65, 15, 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_pool_checkout_returns_none_if_expired() { future::lazy(|| { let pool = pool_no_timer(); let key = (Arc::new("foo".to_string()), Ver::Http1); let pooled = pool.pooled(c(key.clone()), Uniq(41)); drop(pooled); ::std::thread::sleep(pool.inner.connections.lock().unwrap().timeout.unwrap()); assert!(pool.checkout(key).poll().unwrap().is_not_ready()); ::futures::future::ok::<(), ()>(()) }).wait().unwrap(); }
rust_cleaned_test_functions.jsonl/35806
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 262 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 15709, 68186, 58900, 31488, 11119, 80221, 368, 341, 286, 3853, 486, 49013, 79453, 341, 310, 1077, 7314, 284, 7314, 6536, 16255, 543, 310, 1077, 1376, 284, 320, 36809, 486, 931, 445, 7975, 3263, 98...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_log_connect_stats_assoc_failure() { let connect_stats = ConnectStats { result: ConnectFailure::AssociationFailure(AssociationFailure { bss_protection: BssProtection::Open, code: fidl_mlme::AssociateResultCodes::RefusedReasonUnspecified, }) .into(), ..fake_connect_stats() }; let expected_metrics_subset = hashset! { metrics::CONNECTION_RESULT_METRIC_ID, metrics::CONNECTION_FAILURE_METRIC_ID, metrics::ASSOCIATION_FAILURE_METRIC_ID, }; test_metric_subset(&connect_stats, expected_metrics_subset, hashset! {}); }
rust_cleaned_test_functions.jsonl/14746
{ "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, 5224, 15720, 15381, 18891, 43618, 368, 341, 286, 1077, 4564, 15381, 284, 13015, 16635, 341, 310, 1102, 25, 13015, 17507, 486, 63461, 17507, 4346, 778, 2119, 367, 17507, 341, 394, 293, 778, 2540, 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, 1...
1
#[test] fn test_58() { assert_eq!(Solution::length_of_last_word("Hello World".to_owned()), 5); assert_eq!(Solution::length_of_last_word(" ".to_owned()), 0); assert_eq!(Solution::length_of_last_word("".to_owned()), 0); assert_eq!(Solution::length_of_last_word(" rrrrr ".to_owned()), 5); }
rust_cleaned_test_functions.jsonl/98946
{ "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, 62, 20, 23, 368, 341, 286, 2060, 10714, 10297, 36842, 486, 4129, 3575, 12195, 13533, 445, 9707, 4337, 3263, 983, 51973, 11858, 220, 20, 317, 286, 2060, 10714, 10297, 36842, 486, 4129, 3575, 12195,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_remote() { use super::arg::*; let mut p = Remote::try_new(RemoteArg::new("localhost:11222")).unwrap(); p.sendline(sendline().content(b"hello".to_vec()).into()).unwrap(); assert_eq!(&p.recvline(recvline().into()).unwrap(), b"yes\n"); }
rust_cleaned_test_functions.jsonl/51842
{ "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, 36425, 368, 341, 262, 990, 2256, 486, 858, 79304, 262, 1077, 5206, 281, 284, 20738, 486, 1539, 5921, 2785, 336, 1272, 2735, 486, 931, 445, 8301, 25, 16, 16, 17, 17, 17, 15197, 15454, 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