Home
last modified time | relevance | path

Searched refs:unwrap (Results 1 - 25 of 667) sorted by relevance

12345678910>>...27

/third_party/rust/crates/rust-openssl/openssl/src/x509/
H A Dtests.rs40 let rsa = Rsa::generate(2048).unwrap(); in pkey()
41 PKey::from_rsa(rsa).unwrap() in pkey()
47 let cert = X509::from_pem(cert).unwrap(); in test_cert_loading()
48 let fingerprint = cert.digest(MessageDigest::sha1()).unwrap(); in test_cert_loading()
51 let hash_vec = Vec::from_hex(hash_str).unwrap(); in test_cert_loading()
59 let cert = X509::from_pem(cert).unwrap(); in test_debug()
75 let cert = X509::from_pem(cert).unwrap(); in test_cert_issue_validity()
86 let cert = X509::from_pem(cert).unwrap(); in test_save_der()
88 let der = cert.to_der().unwrap(); in test_save_der()
95 let cert = X509::from_pem(cert).unwrap(); in test_subject_read_cn()
[all...]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/IR/
H A DCore.cpp56 initializeCore(*unwrap(R)); in LLVMInitializeCore()
87 unwrap(C)->setDiagnosticHandlerCallBack( in LLVMContextSetDiagnosticHandler()
95 unwrap(C)->getDiagnosticHandlerCallBack()); in LLVMContextGetDiagnosticHandler()
99 return unwrap(C)->getDiagnosticContext(); in LLVMContextGetDiagnosticContext()
106 unwrap(C)->setYieldCallback(YieldCallback, OpaqueHandle); in LLVMContextSetYieldCallback()
110 return unwrap(C)->shouldDiscardValueNames(); in LLVMContextShouldDiscardValueNames()
114 unwrap(C)->setDiscardValueNames(Discard); in LLVMContextSetDiscardValueNames()
118 delete unwrap(C); in LLVMContextDispose()
123 return unwrap(C)->getMDKindID(StringRef(Name, SLen)); in LLVMGetMDKindIDInContext()
143 auto &Ctx = *unwrap( in LLVMCreateEnumAttribute()
[all...]
/third_party/rust/crates/nix/test/
H A Dtest_unistd.rs94 close(fd).unwrap(); in test_mkstemp()
95 unlink(path.as_path()).unwrap(); in test_mkstemp()
110 let tempdir = tempdir().unwrap(); in test_mkfifo()
113 mkfifo(&mkfifo_fifo, Mode::S_IRUSR).unwrap(); in test_mkfifo()
115 let stats = stat::stat(&mkfifo_fifo).unwrap(); in test_mkfifo()
138 let tempdir = tempdir().unwrap(); in test_mkfifoat_none()
141 mkfifoat(None, &mkfifoat_fifo, Mode::S_IRUSR).unwrap(); in test_mkfifoat_none()
143 let stats = stat::stat(&mkfifoat_fifo).unwrap(); in test_mkfifoat_none()
159 let tempdir = tempdir().unwrap(); in test_mkfifoat()
160 let dirfd = open(tempdir.path(), OFlag::empty(), Mode::empty()).unwrap(); in test_mkfifoat()
[all...]
H A Dtest_fcntl.rs38 let mut tmp = NamedTempFile::new().unwrap(); in test_openat()
39 tmp.write_all(CONTENTS).unwrap(); in test_openat()
42 open(tmp.path().parent().unwrap(), OFlag::empty(), Mode::empty()) in test_openat()
43 .unwrap(); in test_openat()
46 tmp.path().file_name().unwrap(), in test_openat()
50 .unwrap(); in test_openat()
53 assert_eq!(4, read(fd, &mut buf).unwrap()); in test_openat()
56 close(fd).unwrap(); in test_openat()
57 close(dirfd).unwrap(); in test_openat()
63 let old_dir = tempfile::tempdir().unwrap(); in test_renameat()
[all...]
H A Dtest_pty.rs19 let m = posix_openpt(OFlag::O_RDWR).unwrap(); in test_explicit_close()
20 close(m.into_raw_fd()).unwrap(); in test_explicit_close()
21 tempfile().unwrap() in test_explicit_close()
25 f.write_all(b"whatever").unwrap(); in test_explicit_close()
35 let master_fd = posix_openpt(OFlag::O_RDWR).unwrap(); in test_ptsname_equivalence()
39 let slave_name = unsafe { ptsname(&master_fd) }.unwrap(); in test_ptsname_equivalence()
40 let slave_name_r = ptsname_r(&master_fd).unwrap(); in test_ptsname_equivalence()
52 let master_fd = posix_openpt(OFlag::O_RDWR).unwrap(); in test_ptsname_copy()
56 let slave_name1 = unsafe { ptsname(&master_fd) }.unwrap(); in test_ptsname_copy()
57 let slave_name2 = unsafe { ptsname(&master_fd) }.unwrap(); in test_ptsname_copy()
[all...]
H A Dtest_stat.rs99 let tempdir = tempfile::tempdir().unwrap(); in test_stat_and_fstat()
101 let file = File::create(&filename).unwrap(); in test_stat_and_fstat()
113 let tempdir = tempfile::tempdir().unwrap(); in test_fstatat()
115 File::create(&filename).unwrap(); in test_fstatat()
120 stat::fstatat(dirfd.unwrap(), &filename, fcntl::AtFlags::empty()); in test_fstatat()
129 let tempdir = tempfile::tempdir().unwrap(); in test_stat_fstat_lstat()
133 File::create(&filename).unwrap(); in test_stat_fstat_lstat()
134 symlink("bar.txt", &linkname).unwrap(); in test_stat_fstat_lstat()
135 let link = File::open(&linkname).unwrap(); in test_stat_fstat_lstat()
151 let tempdir = tempfile::tempdir().unwrap(); in test_fchmod()
[all...]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/
H A DTarget.cpp29 inline TargetLibraryInfoImpl *unwrap(LLVMTargetLibraryInfoRef P) { in unwrap() function
44 initializeTarget(*unwrap(R)); in LLVMInitializeTarget()
48 return wrap(&unwrap(M)->getDataLayout()); in LLVMGetModuleDataLayout()
52 unwrap(M)->setDataLayout(*unwrap(DL)); in LLVMSetModuleDataLayout()
60 delete unwrap(TD); in LLVMDisposeTargetData()
65 unwrap(PM)->add(new TargetLibraryInfoWrapperPass(*unwrap(TLI))); in LLVMAddTargetLibraryInfo()
69 std::string StringRep = unwrap(TD)->getStringRepresentation(); in LLVMCopyStringRepOfTargetData()
74 return unwrap(T in LLVMByteOrder()
[all...]
/third_party/rust/crates/rust-openssl/openssl/src/
H A Dpkey_ctx.rs12 //! let key = Rsa::generate(4096).unwrap();
13 //! let key = PKey::from_rsa(key).unwrap();
15 //! let mut ctx = PkeyCtx::new(&key).unwrap();
16 //! ctx.encrypt_init().unwrap();
20 //! ctx.encrypt_to_vec(data, &mut ciphertext).unwrap();
33 let mut ctx = PkeyCtx::new_id(Id::CMAC).unwrap();
34 ctx.keygen_init().unwrap();
35 ctx.set_keygen_cipher(Cipher::aes_128_cbc()).unwrap();
36 ctx.set_keygen_mac_key(b"0123456789abcdef").unwrap();
37 let cmac_key = ctx.keygen().unwrap();
[all...]
H A Ddsa.rs399 /// let dsa_ref = Dsa::generate(1024).unwrap();
401 /// let pub_key: PKey<_> = dsa_ref.clone().try_into().unwrap();
402 /// let priv_key: PKey<_> = dsa_ref.try_into().unwrap();
411 /// signer.update(TEST_DATA).unwrap();
413 /// let signature = signer.sign_to_vec().unwrap();
415 /// let signature = DsaSig::from_der(&signature).unwrap();
418 /// let r = BigNum::from_slice(&signature.r().to_vec()).unwrap();
419 /// let s = BigNum::from_slice(&signature.s().to_vec()).unwrap();
422 /// let signature = DsaSig::from_private_components(r, s).unwrap();
425 /// let signature = signature.to_der().unwrap();
[all...]
H A Dsign.rs19 //! let keypair = Rsa::generate(2048).unwrap();
20 //! let keypair = PKey::from_rsa(keypair).unwrap();
26 //! let mut signer = Signer::new(MessageDigest::sha256(), &keypair).unwrap();
27 //! signer.update(data).unwrap();
28 //! signer.update(data2).unwrap();
29 //! let signature = signer.sign_to_vec().unwrap();
32 //! let mut verifier = Verifier::new(MessageDigest::sha256(), &keypair).unwrap();
33 //! verifier.update(data).unwrap();
34 //! verifier.update(data2).unwrap();
35 //! assert!(verifier.verify(&signature).unwrap());
[all...]
/third_party/rust/crates/clap/clap_lex/tests/
H A Dshorts.rs6 let next = raw.next(&mut cursor).unwrap(); in iter()
7 let shorts = next.to_short().unwrap(); in iter()
9 let actual: String = shorts.map(|s| s.unwrap()).collect(); in iter()
18 let next = raw.next(&mut cursor).unwrap(); in next_flag()
19 let mut shorts = next.to_short().unwrap(); in next_flag()
22 actual.push(shorts.next_flag().unwrap().unwrap()); in next_flag()
23 actual.push(shorts.next_flag().unwrap().unwrap()); in next_flag()
24 actual.push(shorts.next_flag().unwrap() in next_flag()
[all...]
/third_party/rust/crates/linux-raw-sys/gen/src/
H A Dmain.rs20 let _exe = args.next().unwrap(); in main()
29 let out = tempdir::TempDir::new("linux-raw-sys").unwrap(); in main()
35 for entry in fs::read_dir("../src").unwrap() { in main()
36 let entry = entry.unwrap(); in main()
37 assert!(!entry.path().to_str().unwrap().ends_with(".")); in main()
38 if entry.file_type().unwrap().is_dir() { in main()
44 let mut src_lib_rs_in = File::open("../src/lib.rs").unwrap(); in main()
48 .unwrap(); in main()
51 .unwrap(); in main()
54 let mut src_lib_rs = File::create("../src/lib.rs").unwrap(); in main()
[all...]
/third_party/rust/crates/rustix/tests/path/
H A Darg.rs16 assert_eq!("hello", t.as_str().unwrap()); in test_arg()
18 assert_eq!(cstr!("hello"), Borrow::borrow(&t.as_cow_c_str().unwrap())); in test_arg()
19 assert_eq!(cstr!("hello"), Borrow::borrow(&t.into_c_str().unwrap())); in test_arg()
22 assert_eq!("hello", Arg::as_str(&t).unwrap()); in test_arg()
24 assert_eq!(cstr!("hello"), Borrow::borrow(&t.as_cow_c_str().unwrap())); in test_arg()
25 assert_eq!(cstr!("hello"), Borrow::borrow(&t.into_c_str().unwrap())); in test_arg()
28 assert_eq!("hello", t.as_str().unwrap()); in test_arg()
30 assert_eq!(cstr!("hello"), Borrow::borrow(&t.as_cow_c_str().unwrap())); in test_arg()
31 assert_eq!(cstr!("hello"), Borrow::borrow(&t.into_c_str().unwrap())); in test_arg()
34 assert_eq!("hello", t.as_str().unwrap()); in test_arg()
[all...]
/third_party/rust/crates/rust-openssl/openssl/src/ssl/test/
H A Dmod.rs64 client.ctx().set_ca_file("test/root-ca.pem").unwrap(); in verify_trusted()
74 let mut store = X509StoreBuilder::new().unwrap(); in verify_trusted_with_set_cert()
75 let x509 = X509::from_pem(ROOT_CERT).unwrap(); in verify_trusted_with_set_cert()
76 store.add_cert(x509).unwrap(); in verify_trusted_with_set_cert()
80 client.ctx().set_verify_cert_store(store.build()).unwrap(); in verify_trusted_with_set_cert()
125 client.ctx().set_ca_file("test/root-ca.pem").unwrap(); in verify_trusted_callback_override_ok()
145 client.ctx().set_ca_file("test/root-ca.pem").unwrap(); in verify_trusted_callback_override_bad()
179 client.ctx().set_ca_file("test/root-ca.pem").unwrap(); in verify_trusted_get_error_ok()
221 let cert = x509.current_cert().unwrap(); in verify_callback()
222 let digest = cert.digest(MessageDigest::sha1()).unwrap(); in verify_callback()
[all...]
/third_party/rust/crates/clap/tests/builder/
H A Daction.rs13 let matches = cmd.clone().try_get_matches_from(["test"]).unwrap(); in set()
21 .unwrap(); in set()
22 assert_eq!(matches.get_one::<String>("mammal").unwrap(), "dog"); in set()
29 let err = result.err().unwrap(); in set()
36 .unwrap(); in set()
37 assert_eq!(matches.get_one::<String>("mammal").unwrap(), "cat"); in set()
46 let matches = cmd.clone().try_get_matches_from(["test"]).unwrap(); in append()
54 .unwrap(); in append()
55 assert_eq!(matches.get_one::<String>("mammal").unwrap(), "dog"); in append()
58 matches.indices_of("mammal").unwrap() in append()
[all...]
H A Dflag_subcommands.rs18 .unwrap(); in flag_subcommand_normal()
19 assert_eq!(matches.subcommand_name().unwrap(), "some"); in flag_subcommand_normal()
20 let sub_matches = matches.subcommand_matches("some").unwrap(); in flag_subcommand_normal()
43 .unwrap(); in flag_subcommand_normal_with_alias()
44 assert_eq!(matches.subcommand_name().unwrap(), "some"); in flag_subcommand_normal_with_alias()
45 let sub_matches = matches.subcommand_matches("some").unwrap(); in flag_subcommand_normal_with_alias()
64 .unwrap(); in flag_subcommand_short()
65 assert_eq!(matches.subcommand_name().unwrap(), "some"); in flag_subcommand_short()
66 let sub_matches = matches.subcommand_matches("some").unwrap(); in flag_subcommand_short()
85 .unwrap(); in flag_subcommand_short_with_args()
[all...]
H A Dtests.rs93 .unwrap(); in check_complex_output()
94 match matches.get_one::<u8>("flag").unwrap() { in check_complex_output()
96 writeln!(w, "flag NOT present").unwrap(); in check_complex_output()
99 writeln!(w, "flag present {} times", n).unwrap(); in check_complex_output()
105 writeln!(w, "option present with value: {}", v).unwrap(); in check_complex_output()
109 writeln!(w, "An option: {}", o).unwrap(); in check_complex_output()
113 writeln!(w, "option NOT present").unwrap(); in check_complex_output()
117 writeln!(w, "positional present with value: {}", p).unwrap(); in check_complex_output()
119 writeln!(w, "positional NOT present").unwrap(); in check_complex_output()
123 writeln!(w, "flag2 present").unwrap(); in check_complex_output()
[all...]
/third_party/rust/crates/which-rs/tests/
H A Dbasic.rs57 let tempdir = tempfile::tempdir().unwrap(); in new()
64 builder.create(&p).unwrap(); in new()
65 bins.push(mk_bin(&p, BIN_NAME, "").unwrap()); in new()
66 bins.push(mk_bin(&p, BIN_NAME, "exe").unwrap()); in new()
67 bins.push(mk_bin(&p, BIN_NAME, "cmd").unwrap()); in new()
71 builder.create(&p).unwrap(); in new()
72 bins.push(mk_bin(&p, "win-bin", "exe").unwrap()); in new()
76 paths: env::join_paths(paths).unwrap(), in new()
112 String::from(result.unwrap().to_str().unwrap()), in _which_all()
[all...]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Object/
H A DObject.cpp23 inline OwningBinary<ObjectFile> *unwrap(LLVMObjectFileRef OF) { in unwrap() function
32 inline section_iterator *unwrap(LLVMSectionIteratorRef SI) { in unwrap() function
42 inline symbol_iterator *unwrap(LLVMSymbolIteratorRef SI) { in unwrap() function
52 inline relocation_iterator *unwrap(LLVMRelocationIteratorRef SI) { in unwrap() function
67 auto maybeContext = Context ? unwrap(Context) : nullptr; in LLVMCreateBinary()
69 createBinary(unwrap(MemBuf)->getMemBufferRef(), maybeContext)); in LLVMCreateBinary()
79 auto Buf = unwrap(BR)->getMemoryBufferRef(); in LLVMBinaryCopyMemoryBuffer()
86 delete unwrap(BR); in LLVMDisposeBinary()
132 return BinaryTypeMapper::mapBinaryTypeToLLVMBinaryType(unwrap(BR)->getType()); in LLVMBinaryGetType()
139 auto universal = cast<MachOUniversalBinary>(unwrap(B in LLVMMachOUniversalBinaryCopyObjectForArch()
[all...]
/third_party/rust/crates/nix/test/sys/
H A Dtest_sockopt.rs24 .unwrap(); in test_local_peercred_seqpacket()
25 let xucred = getsockopt(fd1, sockopt::LocalPeerCred).unwrap(); in test_local_peercred_seqpacket()
50 .unwrap(); in test_local_peercred_stream()
51 let xucred = getsockopt(fd1, sockopt::LocalPeerCred).unwrap(); in test_local_peercred_stream()
70 .unwrap(); in is_so_mark_functional()
71 setsockopt(s, sockopt::Mark, &1337).unwrap(); in is_so_mark_functional()
72 let mark = getsockopt(s, sockopt::Mark).unwrap(); in is_so_mark_functional()
84 .unwrap(); in test_so_buf()
86 setsockopt(fd, sockopt::SndBuf, &bufsize).unwrap(); in test_so_buf()
87 let actual = getsockopt(fd, sockopt::SndBuf).unwrap(); in test_so_buf()
[all...]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Scalar/
H A DScalar.cpp118 unwrap(PM)->add(createLoopSimplifyCFGPass()); in LLVMAddLoopSimplifyCFGPass()
122 initializeScalarOpts(*unwrap(R)); in LLVMInitializeScalarOpts()
126 unwrap(PM)->add(createAggressiveDCEPass()); in LLVMAddAggressiveDCEPass()
130 unwrap(PM)->add(createDeadCodeEliminationPass()); in LLVMAddDCEPass()
134 unwrap(PM)->add(createBitTrackingDCEPass()); in LLVMAddBitTrackingDCEPass()
138 unwrap(PM)->add(createAlignmentFromAssumptionsPass()); in LLVMAddAlignmentFromAssumptionsPass()
142 unwrap(PM)->add(createCFGSimplificationPass(1, false, false, true)); in LLVMAddCFGSimplificationPass()
146 unwrap(PM)->add(createDeadStoreEliminationPass()); in LLVMAddDeadStoreEliminationPass()
150 unwrap(PM)->add(createScalarizerPass()); in LLVMAddScalarizerPass()
154 unwrap(P in LLVMAddGVNPass()
[all...]
/third_party/rust/crates/rustix/tests/net/
H A Dsockopt.rs7 rustix::net::socket(AddressFamily::INET, SocketType::STREAM, Protocol::default()).unwrap(); in test_sockopts()
12 .unwrap() in test_sockopts()
16 rustix::net::sockopt::get_socket_type(&s).unwrap(), in test_sockopts()
20 assert!(!rustix::net::sockopt::get_socket_broadcast(&s).unwrap()); in test_sockopts()
23 .unwrap() in test_sockopts()
26 assert!(!rustix::net::sockopt::get_socket_passcred(&s).unwrap()); in test_sockopts()
27 assert_ne!(rustix::net::sockopt::get_ip_ttl(&s).unwrap(), 0); in test_sockopts()
28 assert_ne!(rustix::net::sockopt::get_ip_ttl(&s).unwrap(), 77); in test_sockopts()
38 assert!(rustix::net::sockopt::get_ip_multicast_loop(&s).unwrap()); in test_sockopts()
48 assert_eq!(rustix::net::sockopt::get_ip_multicast_ttl(&s).unwrap(), in test_sockopts()
[all...]
/third_party/rust/crates/rustix/tests/io/
H A Dread_write.rs12 let tmp = tempfile::tempdir().unwrap(); in test_readwrite_pv()
13 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_readwrite_pv()
20 .unwrap(); in test_readwrite_pv()
25 pwritev(&foo, &[IoSlice::new(b"hello")], 200).unwrap(); in test_readwrite_pv()
33 Err(err) => Err(err).unwrap(), in test_readwrite_pv()
36 pwritev(&foo, &[IoSlice::new(b"world")], 300).unwrap(); in test_readwrite_pv()
38 preadv(&foo, &mut [IoSliceMut::new(&mut buf)], 200).unwrap(); in test_readwrite_pv()
40 preadv(&foo, &mut [IoSliceMut::new(&mut buf)], 300).unwrap(); in test_readwrite_pv()
50 let tmp = tempfile::tempdir().unwrap(); in test_readwrite_p()
51 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_readwrite_p()
[all...]
/third_party/rust/crates/rustix/tests/fs/
H A Dflock.rs6 let f = openat(cwd(), "Cargo.toml", OFlags::RDONLY, Mode::empty()).unwrap(); in test_flock()
7 flock(&f, FlockOperation::LockExclusive).unwrap(); in test_flock()
8 flock(&f, FlockOperation::Unlock).unwrap(); in test_flock()
9 let g = openat(cwd(), "Cargo.toml", OFlags::RDONLY, Mode::empty()).unwrap(); in test_flock()
10 flock(&g, FlockOperation::LockExclusive).unwrap(); in test_flock()
11 flock(&g, FlockOperation::Unlock).unwrap(); in test_flock()
15 let f = openat(cwd(), "Cargo.toml", OFlags::RDONLY, Mode::empty()).unwrap(); in test_flock()
16 flock(&f, FlockOperation::LockShared).unwrap(); in test_flock()
17 let g = openat(cwd(), "Cargo.toml", OFlags::RDONLY, Mode::empty()).unwrap(); in test_flock()
18 flock(&g, FlockOperation::LockShared).unwrap(); in test_flock()
[all...]
/third_party/rust/crates/rustix/tests/process/
H A Dpriority.rs8 let old = nice(0).unwrap(); in test_priorities()
12 let get_prio = getpriority_process(None).unwrap(); in test_priorities()
17 let new = nice(1).unwrap(); in test_priorities()
25 let get = nice(0).unwrap(); in test_priorities()
30 let get_prio = getpriority_process(None).unwrap(); in test_priorities()
33 setpriority_process(None, get + 1).unwrap(); in test_priorities()
34 let now = getpriority_process(None).unwrap(); in test_priorities()
41 setpriority_process(None, get + 10000).unwrap(); in test_priorities()
42 let now = getpriority_process(None).unwrap(); in test_priorities()
57 let start = getpriority_process(None).unwrap(); in test_priorities()
[all...]

Completed in 11 milliseconds

12345678910>>...27