/aosp_15_r20/external/rust/android-crates-io/crates/libtest-mimic/src/ |
D | lib.rs | 1 //! Write your own tests and benchmarks that look and behave like built-in tests! 4 //! (used by `cargo test`/`rustc --test`). That means: all output looks pretty 11 //! [1]: https://github.com/LukasKalbertodt/libtest-mimic/blob/master/examples/tidy.rs 50 //! You can then run `cargo test --test mytest` to run it. To see the CLI 51 //! arguments supported by this crate, run `cargo test --test mytest -- -h`. 56 //! `libtest-mimic` works on a best-effort basis: it tries to be as close to 64 //! - Output capture and `--nocapture`: simply not supported. The official 66 //! `libtest-mimic` cannot use those. See [this issue][capture] for more 68 //! - `--format=json|junit` 70 //! [capture]: https://github.com/LukasKalbertodt/libtest-mimic/issues/9 [all …]
|
D | args.rs | 9 /// `libtest-mimic` supports a subset of all args/flags supported by the 11 /// the main use cases should work exactly like with the built-in harness. 14 help_template = "USAGE: [OPTIONS] [FILTER]\n\n{all-args}\n\n\n{after-help}", 17 --test-threads flag when running tests (set it to 1).", 21 /// Run ignored and non-ignored tests. 22 #[arg(long = "include-ignored", help = "Run ignored tests")] 45 /// No-op, ignored (libtest-mimic always runs in no-capture mode) 46 #[arg(long = "nocapture", help = "No-op (libtest-mimic always runs in no-capture mode)")] 59 /// This is an alias for `--format=terse`. If this is set, `format` is 65 help = "Display one character per test instead of one line. Alias to --format=terse", [all …]
|
/aosp_15_r20/external/tensorflow/tensorflow/core/platform/ |
H A D | mutex.h | 7 http://www.apache.org/licenses/LICENSE-2.0 28 // Include appropriate platform-dependent implementation details of mutex etc. 47 // Mimic std::mutex + C++17's shared_mutex, adding a LinkerInitialized 66 // ------- 70 // but there is no need to use a while-loop, and no need to signal the 84 // counter--; 101 // ------- 109 // function must have no side-effects on that state. When passed to 112 // - any number of times; 113 // - by any thread using the mutex; and/or [all …]
|
/aosp_15_r20/external/bazelbuild-rules_rust/tools/rustdoc/ |
H A D | rustdoc_test_writer.rs | 2 //! subcommands of Bazel build actions so `rustdoc --test`, which builds and tests 32 fn parse_args() -> Options { in parse_args() 37 .position(|arg| arg == "--") in parse_args() 38 .expect("Unable to find split identifier `--`"); in parse_args() 46 // Remove the leading `--` which is expected to be the first in parse_args() 48 debug_assert_eq!(action_args[0], "--"); in parse_args() 53 .find(|arg| arg.starts_with("--output=")) in parse_args() 56 .expect("Missing `--output` argument"); in parse_args() 60 .find(|arg| arg.starts_with("--optional_test_params=")) in parse_args() 63 .expect("Missing `--optional_test_params` argument"); in parse_args() [all …]
|
/aosp_15_r20/external/rust/android-crates-io/crates/dashmap/src/ |
D | lib.rs | 25 #[cfg(not(feature = "raw-api"))] 28 #[cfg(feature = "raw-api")] 49 if #[cfg(feature = "raw-api")] { 66 fn default_shard_amount() -> usize { in default_shard_amount() 73 fn ncb(shard_amount: usize) -> usize { in ncb() 95 fn clone(&self) -> Self { in clone() 117 fn default() -> Self { in default() 133 pub fn new() -> Self { in new() 148 pub fn with_capacity(capacity: usize) -> Self { in with_capacity() 166 pub fn with_shard_amount(shard_amount: usize) -> Self { in with_shard_amount() [all …]
|
/aosp_15_r20/external/rust/android-crates-io/crates/quickcheck/examples/ |
D | btree_set_range.rs | 9 /// Mimic `RangeBounds::contains`, stabilized in Rust 1.35. 11 fn contains(&self, _: &T) -> bool; in contains() 15 fn contains(&self, item: &T) -> bool { in contains() 29 /// - Panics if range start > end. 30 /// - Panics if range start == end and both bounds are Excluded. 31 fn panics<T: PartialOrd>(range: RangeAny<T>) -> bool { in panics() 42 fn check_range(set: BTreeSet<i32>, range: RangeAny<i32>) -> TestResult { in check_range() 53 fn main() { in main() 54 quickcheck(check_range as fn(_, _) -> TestResult); in main()
|
/aosp_15_r20/external/cronet/build/rust/tests/test_rust_exe/ |
H A D | main.rs | 2 // Use of this source code is governed by a BSD-style license that can be 11 // To mimic third-party, test_rlib_crate has a short crate_name which we do not 15 fn main() { in main() 27 fn test_call_to_rust() { in test_call_to_rust() 32 fn test_call_to_rust_non_standard_arrangement() { in test_call_to_rust_non_standard_arrangement() 37 fn test_proc_macro() { in test_proc_macro()
|
/aosp_15_r20/external/angle/build/rust/tests/test_rust_exe/ |
H A D | main.rs | 2 // Use of this source code is governed by a BSD-style license that can be 11 // To mimic third-party, test_rlib_crate has a short crate_name which we do not 15 fn main() { in main() 27 fn test_call_to_rust() { in test_call_to_rust() 32 fn test_call_to_rust_non_standard_arrangement() { in test_call_to_rust_non_standard_arrangement() 37 fn test_proc_macro() { in test_proc_macro()
|
/aosp_15_r20/platform_testing/libraries/rdroidtest/src/ |
H A D | runner.rs | 9 /// Command-line arguments to ignore, because they are not supported by libtest-mimic. 10 const IGNORED_ARGS: [&str; 2] = ["-Zunstable-options", "--report-time"]; 12 /// The collection of all non-parameterized tests to run. 15 pub static RDROIDTEST_TESTS: [fn() -> Trial] = [..]; 20 pub static RDROIDTEST_PTESTS: [fn() -> Vec<Trial>] = [..]; 23 pub fn main() { in main() 37 pub fn run(test: impl FnOnce()) -> Result<(), Failed> { in run()
|
/aosp_15_r20/external/bazelbuild-rules_rust/crate_universe/src/ |
H A D | utils.rs | 7 pub(crate) const CRATES_IO_INDEX_URL: &str = "https://github.com/rust-lang/crates.io-index"; 13 pub(crate) fn sanitize_module_name(name: &str) -> String { in sanitize_module_name() 14 name.replace('-', "_") in sanitize_module_name() 20 pub(crate) fn sanitize_repository_name(name: &str) -> String { in sanitize_repository_name() 21 name.replace('+', "-") in sanitize_repository_name() 28 /// labels by simply replacing the (+) with a (-). If this file is called by any other cli mod, 30 pub(crate) fn normalize_cargo_file_paths( in normalize_cargo_file_paths() 33 ) -> BTreeMap<PathBuf, String> { in normalize_cargo_file_paths() 50 PathBuf::from(&original_path_str.replace('+', "-")) in normalize_cargo_file_paths() 65 fn test_sanitize_repository_name() { in test_sanitize_repository_name() [all …]
|
/aosp_15_r20/external/trusty/arm-trusted-firmware/ |
D | package-lock.json | 2 "name": "trusted-firmware-a", 8 "name": "trusted-firmware-a", 10 "license": "BSD-3-Clause", 13 "@commitlint/config-conventional": "^19.0.0", 14 "@commitlint/cz-commitlint": "^19.0.0", 16 "conventional-changelog-tf-a": "file:tools/conventional-changelog-tf-a", 18 "js-yaml": "^4.1.0", 19 "standard-version": "^9.5.0" 25 "node_modules/@babel/code-frame": { 27 "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", [all …]
|
/aosp_15_r20/external/rust/android-crates-io/crates/tokio-util/tests/ |
D | io_sink_writer.rs | 12 async fn test_copied_sink_writer() -> Result<(), Error> { in test_copied_sink_writer() 14 // Note that the sink must mimic a writable object, e.g. have `std::io::Error` in test_copied_sink_writer() 37 fn new() -> Self { in new() 45 fn encode(&mut self, item: &'a [u8], dst: &mut bytes::BytesMut) -> Result<(), Self::Error> { in encode() 55 async fn test_direct_sink_writer() -> Result<(), Error> { in test_direct_sink_writer()
|
/aosp_15_r20/external/tensorflow/tensorflow/python/autograph/tests/ |
H A D | loop_scoping_test.py | 7 # http://www.apache.org/licenses/LICENSE-2.0 38 x -= 1 61 x -= 1 74 x -= 1 78 def for_defines_iterate(n, fn): argument 80 for i in fn(n): 82 return i, s # pylint:disable=undefined-loop-variable 85 def for_reuses_iterate(n, fn): argument 88 for i in fn(n): 93 def for_alters_iterate(n, fn): argument [all …]
|
/aosp_15_r20/external/arm-trusted-firmware/ |
H A D | package-lock.json | 2 "name": "trusted-firmware-a", 8 "name": "trusted-firmware-a", 11 "license": "BSD-3-Clause", 14 "@commitlint/config-conventional": "^14.1.0", 16 "conventional-changelog-tf-a": "file:tools/conventional-changelog-tf-a", 17 "cz-conventional-changelog": "^3.3.0", 19 "standard-version": "^9.3.2" 22 "node_modules/@babel/code-frame": { 24 "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", 25 …"integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4… [all …]
|
/aosp_15_r20/external/rust/android-crates-io/crates/libbpf-rs/src/ |
D | print.rs | 24 fn from(level: libbpf_sys::libbpf_print_level) -> Self { in from() 36 pub type PrintCallback = fn(PrintLevel, String); 38 /// Mimic the default print functionality of libbpf. This way if the user calls `get_print` when no 41 fn default_callback(_lvl: PrintLevel, msg: String) { in default_callback() 45 // While we can't say that set_print is thread-safe, because we shouldn't assume that of 56 extern "C" fn outer_print_cb( in outer_print_cb() 62 // See <https://github.com/rust-lang/rust-bindgen/issues/2631> in outer_print_cb() 64 ) -> c_int { in outer_print_cb() 82 /// * `callback` - Either a tuple `(min_level, function)` where `min_level` is the lowest priority 94 /// fn print_to_log(level: PrintLevel, msg: String) { [all …]
|
/aosp_15_r20/external/cronet/third_party/abseil-cpp/absl/debugging/internal/ |
H A D | vdso_support.h | 8 // https://www.apache.org/licenses/LICENSE-2.0 19 // VDSO stands for "Virtual Dynamic Shared Object" -- a page of 22 // every process by kernels which support VDSO, such as 2.6.x for 32-bit 23 // executables, and 2.6.24 and above for 64-bit executables. 26 // http://www.trilithium.com/johan/2005/08/linux-gate/ 28 // VDSOSupport -- a class representing kernel VDSO (if present). 33 // typedef (*FN)(unsigned *, void *, void *); 34 // FN fn = nullptr; 36 // fn = reinterpret_cast<FN>(info.address); 71 // compile-time constant. [all …]
|
/aosp_15_r20/external/private-join-and-compute/third_party/abseil-cpp-20230125.2/absl/debugging/internal/ |
H A D | vdso_support.h | 8 // https://www.apache.org/licenses/LICENSE-2.0 19 // VDSO stands for "Virtual Dynamic Shared Object" -- a page of 22 // every process by kernels which support VDSO, such as 2.6.x for 32-bit 23 // executables, and 2.6.24 and above for 64-bit executables. 26 // http://www.trilithium.com/johan/2005/08/linux-gate/ 28 // VDSOSupport -- a class representing kernel VDSO (if present). 33 // typedef (*FN)(unsigned *, void *, void *); 34 // FN fn = nullptr; 36 // fn = reinterpret_cast<FN>(info.address); 71 // compile-time constant. [all …]
|
/aosp_15_r20/external/abseil-cpp/absl/debugging/internal/ |
H A D | vdso_support.h | 8 // https://www.apache.org/licenses/LICENSE-2.0 19 // VDSO stands for "Virtual Dynamic Shared Object" -- a page of 22 // every process by kernels which support VDSO, such as 2.6.x for 32-bit 23 // executables, and 2.6.24 and above for 64-bit executables. 26 // http://www.trilithium.com/johan/2005/08/linux-gate/ 28 // VDSOSupport -- a class representing kernel VDSO (if present). 33 // typedef (*FN)(unsigned *, void *, void *); 34 // FN fn = nullptr; 36 // fn = reinterpret_cast<FN>(info.address); 71 // compile-time constant. [all …]
|
/aosp_15_r20/external/rust/android-crates-io/crates/grpcio-sys/grpc/third_party/abseil-cpp/absl/debugging/internal/ |
D | vdso_support.h | 8 // https://www.apache.org/licenses/LICENSE-2.0 19 // VDSO stands for "Virtual Dynamic Shared Object" -- a page of 22 // every process by kernels which support VDSO, such as 2.6.x for 32-bit 23 // executables, and 2.6.24 and above for 64-bit executables. 26 // http://www.trilithium.com/johan/2005/08/linux-gate/ 28 // VDSOSupport -- a class representing kernel VDSO (if present). 33 // typedef (*FN)(unsigned *, void *, void *); 34 // FN fn = nullptr; 36 // fn = reinterpret_cast<FN>(info.address); 71 // compile-time constant. [all …]
|
/aosp_15_r20/external/webrtc/third_party/abseil-cpp/absl/debugging/internal/ |
H A D | vdso_support.h | 8 // https://www.apache.org/licenses/LICENSE-2.0 19 // VDSO stands for "Virtual Dynamic Shared Object" -- a page of 22 // every process by kernels which support VDSO, such as 2.6.x for 32-bit 23 // executables, and 2.6.24 and above for 64-bit executables. 26 // http://www.trilithium.com/johan/2005/08/linux-gate/ 28 // VDSOSupport -- a class representing kernel VDSO (if present). 33 // typedef (*FN)(unsigned *, void *, void *); 34 // FN fn = nullptr; 36 // fn = reinterpret_cast<FN>(info.address); 71 // compile-time constant. [all …]
|
/aosp_15_r20/external/openscreen/third_party/abseil/src/absl/debugging/internal/ |
H A D | vdso_support.h | 8 // https://www.apache.org/licenses/LICENSE-2.0 19 // VDSO stands for "Virtual Dynamic Shared Object" -- a page of 22 // every process by kernels which support VDSO, such as 2.6.x for 32-bit 23 // executables, and 2.6.24 and above for 64-bit executables. 26 // http://www.trilithium.com/johan/2005/08/linux-gate/ 28 // VDSOSupport -- a class representing kernel VDSO (if present). 33 // typedef (*FN)(unsigned *, void *, void *); 34 // FN fn = nullptr; 36 // fn = reinterpret_cast<FN>(info.address); 71 // compile-time constant. [all …]
|
/aosp_15_r20/external/angle/third_party/abseil-cpp/absl/debugging/internal/ |
H A D | vdso_support.h | 8 // https://www.apache.org/licenses/LICENSE-2.0 19 // VDSO stands for "Virtual Dynamic Shared Object" -- a page of 22 // every process by kernels which support VDSO, such as 2.6.x for 32-bit 23 // executables, and 2.6.24 and above for 64-bit executables. 26 // http://www.trilithium.com/johan/2005/08/linux-gate/ 28 // VDSOSupport -- a class representing kernel VDSO (if present). 33 // typedef (*FN)(unsigned *, void *, void *); 34 // FN fn = nullptr; 36 // fn = reinterpret_cast<FN>(info.address); 71 // compile-time constant. [all …]
|
/aosp_15_r20/external/pytorch/torch/onnx/_internal/fx/passes/ |
H A D | functionalization.py | 1 # mypy: allow-untyped-defs 34 def fn(a, b): 38 For a call like `fn(x, y)`, the variable `x` outside is also mutated. Hence just 45 def fn(a, b): 50 def fn(a, b): 74 def _functionalize(self, function: Callable) -> Callable: 77 # Ref: https://github.com/pytorch/pytorch/issues/99774#issuecomment-1527949391 99 def _run(self, *args) -> torch.fx.GraphModule: 105 # Mimic `torch._dynamo.export(aten_graph=True)` behavior in invoking `make_fx`. 144 def _run(self, *args) -> torch.fx.GraphModule:
|
/aosp_15_r20/packages/modules/ConfigInfrastructure/aconfigd/src/ |
D | storage_files_manager.rs | 8 * http://www.apache.org/licenses/LICENSE-2.0 38 pub(crate) fn new(root_dir: &Path) -> Self { in new() 47 fn get_storage_files(&mut self, container: &str) -> Option<&mut StorageFiles> { in get_storage_files() 52 pub(crate) fn add_storage_files_from_pb( in add_storage_files_from_pb() 55 ) -> Result<(), AconfigdError> { in add_storage_files_from_pb() 70 fn add_storage_files_from_container( in add_storage_files_from_container() 77 ) -> Result<&mut StorageFiles, AconfigdError> { in add_storage_files_from_container() 103 fn update_container_storage_files( in update_container_storage_files() 110 ) -> Result<(), AconfigdError> { in update_container_storage_files() 157 pub(crate) fn add_or_update_container_storage_files( in add_or_update_container_storage_files() [all …]
|
/aosp_15_r20/external/rust/android-crates-io/crates/ciborium-io/src/ |
D | lib.rs | 1 // SPDX-License-Identifier: Apache-2.0 3 //! Simple, Low-level I/O traits 6 //! mimic their counterparts in `std::io`, but are trimmed for simplicity 9 //! be a zero-cost abstraction. 36 fn read_exact(&mut self, data: &mut [u8]) -> Result<(), Self::Error>; in read_exact() 48 fn write_all(&mut self, data: &[u8]) -> Result<(), Self::Error>; in write_all() 51 fn flush(&mut self) -> Result<(), Self::Error>; in flush() 59 fn read_exact(&mut self, data: &mut [u8]) -> Result<(), Self::Error> { in read_exact() 69 fn write_all(&mut self, data: &[u8]) -> Result<(), Self::Error> { in write_all() 74 fn flush(&mut self) -> Result<(), Self::Error> { in flush() [all …]
|