Home
last modified time | relevance | path

Searched +full:expect +full:- +full:utils (Results 1 – 25 of 1109) sorted by relevance

12345678910>>...45

/aosp_15_r20/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/
DUtilsTest.java8 * http://www.apache.org/licenses/LICENSE-2.0
18 import static com.android.bluetooth.Utils.formatSimple;
42 import com.google.common.truth.Expect;
59 /** Test for Utils.java */
64 @Rule public Expect expect = Expect.create(); field in UtilsTest
73 long s = Utils.byteArrayToLong(valueBuf); in byteArrayToLong()
80 String str = Utils.byteArrayToString(valueBuf); in byteArrayToString()
96 assertThat(Utils.uuidsToByteArray(uuids)).isEqualTo(converter.array()); in uuidsToByteArray()
102 assertThat(Utils.checkServiceAvailable(null, tag)).isFalse(); in checkServiceAvailable()
106 assertThat(Utils.checkServiceAvailable(mockProfile, tag)).isFalse(); in checkServiceAvailable()
[all …]
/aosp_15_r20/hardware/interfaces/broadcastradio/common/utilsaidl/src/
H A DUtils.cpp8 * http://www.apache.org/licenses/LICENSE-2.0
17 #define LOG_TAG "BcRadioAidlDef.utils"
19 #include "broadcastradio-utils-aidl/Utils.h"
21 #include <android-base/logging.h>
22 #include <android-base/parsedouble.h>
23 #include <android-base/parseint.h>
24 #include <android-base/strings.h>
30 namespace utils { namespace
56 if (it->type == type) { in maybeGetId()
58 *val = it->value; in maybeGetId()
[all …]
H A DUtilsV2.cpp8 * http://www.apache.org/licenses/LICENSE-2.0
19 #include "broadcastradio-utils-aidl/UtilsV2.h"
20 #include "broadcastradio-utils-aidl/Utils.h"
22 #include <android-base/logging.h>
23 #include <android-base/strings.h>
27 namespace utils { namespace
33 auto expect = [&valid](bool condition, const std::string& message) { in isValidV2() local
42 expect(false, "IdentifierType::INVALID"); in isValidV2()
45 expect(val > 100000u, "f > 100MHz"); in isValidV2()
49 expect(val > 100u, "f > 100kHz"); in isValidV2()
[all …]
/aosp_15_r20/external/opencensus-java/api/src/test/java/io/opencensus/internal/
H A DUtilsTest.java8 * http://www.apache.org/licenses/LICENSE-2.0
29 /** Tests for {@link Utils}. */
42 Utils.checkArgument(true, TEST_MESSAGE); in checkArgument()
43 thrown.expect(IllegalArgumentException.class); in checkArgument()
45 Utils.checkArgument(false, TEST_MESSAGE); in checkArgument()
50 thrown.expect(IllegalArgumentException.class); in checkArgument_NullErrorMessage()
52 Utils.checkArgument(false, null); in checkArgument_NullErrorMessage()
57 thrown.expect(IllegalArgumentException.class); in checkArgument_WithSimpleFormat()
59 Utils.checkArgument(false, TEST_MESSAGE_TEMPLATE, TEST_MESSAGE_VALUE); in checkArgument_WithSimpleFormat()
64 thrown.expect(IllegalArgumentException.class); in checkArgument_WithComplexFormat()
[all …]
/aosp_15_r20/hardware/interfaces/broadcastradio/common/utils2x/
H A DUtils.cpp8 * http://www.apache.org/licenses/LICENSE-2.0
16 #define LOG_TAG "BcRadioDef.utils"
18 #include <broadcastradio-utils-2x/Utils.h>
20 #include <android-base/logging.h>
25 namespace utils { namespace
68 // mPos is 1-based for secondary identifiers in operator *()
70 return sel().secondaryIds[mPos - 1]; in operator *()
84 // frameworks/base/services/core/java/com/android/server/broadcastradio/hal2/Utils.java in getBand()
203 auto expect = [&valid](bool condition, std::string message) { in isValid() local
212 expect(false, "IdentifierType::INVALID"); in isValid()
[all …]
/aosp_15_r20/frameworks/base/tools/lint/framework/checks/src/test/java/com/google/android/lint/
H A DFeatureAutomotiveDetectorTest.kt8 * http://www.apache.org/licenses/LICENSE-2.0
58 .expect( in getDetector()
90 .expect( in testWarning2()
121 .expect( in testWarning3()
153 .expect( in testWarning4()
169 import com.android.example.Utils; in testWarning5()
174 Utils.hasFeature("android.hardware.type.automotive"); in testWarning5()
184 .expect( in testWarning5()
186 src/com/android/example/Utils.java:7: Warning: $explanation in testWarning5()
200 import com.android.example.Utils; in testWarning6()
[all …]
/aosp_15_r20/external/deqp/external/openglcts/modules/gl/
H A Dgl4cShadingLanguage420PackTests.hpp3 /*-------------------------------------------------------------------------
5 * -----------------------------
7 * Copyright (c) 2014-2016 The Khronos Group Inc.
13 * http://www.apache.org/licenses/LICENSE-2.0
24 */ /*-------------------------------------------------------------------*/
29 */ /*-------------------------------------------------------------------*/
44 class Utils class
360 typedef std::vector<Utils::QUALIFIERS> qualifierSet;
398 …static std::string getBlockVariableDefinition(const Utils::qualifierSet &qualifiers, const glw::GL…
404 …static std::string getVariableDefinition(VARIABLE_FLAVOUR flavour, const Utils::qualifierSet &qual…
[all …]
/aosp_15_r20/external/autotest/client/common_lib/
H A Dutils_unittest.py3 # pylint: disable=missing-docstring
18 # mock 1.0.0 (in site-packages/chromite/third_party/mock.py)
27 from autotest_lib.client.common_lib import autotemp, utils
30 metrics = utils.metrics_mock
36 self.god.stub_function(utils, "open")
44 self.assertEqual(utils.ip_to_long('0.0.0.0'), 0)
45 self.assertEqual(utils.ip_to_long('255.255.255.255'), 4294967295)
46 self.assertEqual(utils.ip_to_long('192.168.0.1'), 3232235521)
47 self.assertEqual(utils.ip_to_long('1.2.4.8'), 16909320)
51 self.assertEqual(utils.long_to_ip(0), '0.0.0.0')
[all …]
/aosp_15_r20/external/cronet/third_party/libc++/src/test/support/
H A Dfilesystem_test_helper.h38 namespace utils {
83 struct statvfs expect;
84 if (::statvfs(path.c_str(), &expect) == -1)
86 assert(expect.f_bavail > 0);
87 assert(expect.f_bfree > 0);
88 assert(expect.f_bsize > 0);
89 assert(expect.f_blocks > 0);
90 assert(expect.f_frsize > 0);
92 std::uintmax_t fsize = expect.f_frsize;
97 capacity = do_mult(expect.f_blocks);
[all …]
/aosp_15_r20/external/openthread/src/lib/spinel/
H A Dlogger.cpp31 #include "openthread-spinel-config.h"
42 #include "lib/utils/math.hpp"
43 #include "lib/utils/utils.hpp"
48 using Lib::Utils::Min;
49 using Lib::Utils::ToUlong;
120 return (len < 0) ? 0 : Min(static_cast<uint32_t>(len), aSize - 1); in Snprintf()
137 EXPECT(otLoggingGetLevel() >= OT_LOG_LEVEL_DEBG, NO_ACTION); in LogSpinelFrame()
141 EXPECT(unpacked > 0, error = OT_ERROR_PARSE); in LogSpinelFrame()
143 …start += Snprintf(start, static_cast<uint32_t>(end - start), "%s, flg:0x%x, iid:%d, tid:%u, cmd:%s… in LogSpinelFrame()
146 EXPECT(cmd != SPINEL_CMD_RESET, NO_ACTION); in LogSpinelFrame()
[all …]
H A Dspinel_driver.cpp37 #include "lib/utils/math.hpp"
38 #include "lib/utils/utils.hpp"
51 , mSpinelVersionMajor(-1) in SpinelDriver()
52 , mSpinelVersionMinor(-1) in SpinelDriver()
70 SuccessOrDie(mSpinelInterface->Init(HandleReceivedFrame, this, mRxFrameBuffer)); in Init()
112 EXPECT(packed > 0 && static_cast<size_t>(packed) <= sizeof(buffer), error = OT_ERROR_NO_BUFS); in SendReset()
114 EXPECT_NO_ERROR(error = mSpinelInterface->SendFrame(buffer, static_cast<uint16_t>(packed))); in SendReset()
127 EXPECT(!mIsCoprocessorReady, resetDone = true); in ResetCoprocessor()
133 EXPECT(mIsCoprocessorReady, resetDone = false); in ResetCoprocessor()
134 LogCrit("Software reset co-processor successfully"); in ResetCoprocessor()
[all …]
H A Dspinel_decoder.cpp36 #include "lib/utils/utils.hpp"
77 // Boolean value are encoded in 8-bits as either 0x00 or 0x01. All other values are illegal. in ReadBool()
99 EXPECT(mIndex + sizeof(uint8_t) <= mEnd, error = OT_ERROR_PARSE); in ReadUint8()
123 EXPECT(mIndex + sizeof(uint16_t) <= mEnd, error = OT_ERROR_PARSE); in ReadUint16()
149 EXPECT(mIndex + sizeof(uint32_t) <= mEnd, error = OT_ERROR_PARSE); in ReadUint32()
176 EXPECT(mIndex + sizeof(uint64_t) <= mEnd, error = OT_ERROR_PARSE); in ReadUint64()
207 parsedLen = spinel_packed_uint_decode(&mFrame[mIndex], mEnd - mIndex, &uint); in ReadUintPacked()
208 EXPECT(parsedLen > 0, error = OT_ERROR_PARSE); in ReadUintPacked()
222 EXPECT(mIndex + aSize <= mEnd, error = OT_ERROR_PARSE); in ReadItem()
238 EXPECT(ipv6AddrPtr != nullptr, error = OT_ERROR_PARSE); in ReadIp6Address()
[all …]
/aosp_15_r20/system/media/tests/
H A Daudio_effects_utils_tests.cpp8 * http://www.apache.org/licenses/LICENSE-2.0
29 using android::effect::utils::EffectParamReader;
30 using android::effect::utils::EffectParamWrapper;
31 using android::effect::utils::EffectParamWriter;
32 using android::effect::utils::operator==;
33 using android::effect::utils::operator!=;
34 using android::effect::utils::ToString;
51 EXPECT_FALSE(wrapper.validateCmdSize(minCmdSize - 1)); in TEST()
63 EXPECT_FALSE(wrapper.validateCmdSize(minCmdSize - 1)); in TEST()
81 sizeof(uint32_t) * ((i + sizeof(uint32_t) - 1) / sizeof(uint32_t)), in TEST()
[all …]
/aosp_15_r20/external/autotest/server/cros/dynamic_suite/
H A Dsuite_unittest.py4 # Use of this source code is governed by a BSD-style license that can be
31 from autotest_lib.client.common_lib import utils
133 """Expect an attempt to parse the 'control files' in |self.files|.
145 """Expect an attempt to parse the 'control files' in |files|.
150 expect to get parsed.
170 """Expect an attempt to parse the contents of all control files in
242 for syntax errors, by using the un-forgiving parser and pretending to
291 """Should be able to schedule an ad-hoc suite by specifying
296 predicate = SuiteBase.test_name_equals_predicate('name-data_five')
322 """Expect jobs to be scheduled for 'tests' in |self.files|.
[all …]
/aosp_15_r20/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/
H A DEphemeralTest.java8 * http://www.apache.org/licenses/LICENSE-2.0
76 // Framework intents we expect the system to expose to instant applications
80 // Contact intents we expect the system to expose to instant applications
88 "android.intent.action.PICK", null, "vnd.android.cursor.dir/postal-address_v2"));
89 // Storage intents we expect the system to expose to instant applications
107 /** Camera intents we expect the system to expose to instant applications */
124 Utils.prepareSingleUser(getDevice()); in setUp()
145 Utils.runDeviceTestsAsCurrentUser(getDevice(), NORMAL_PKG, TEST_CLASS, "testQuery"); in testNormalQuery()
153 Utils.runDeviceTestsAsCurrentUser(getDevice(), NORMAL_PKG, TEST_CLASS, "testStartNormal"); in testNormalStartNormal()
161 Utils.runDeviceTestsAsCurrentUser(getDevice(), NORMAL_PKG, TEST_CLASS, in testNormalStartEphemeral()
[all …]
/aosp_15_r20/packages/modules/AdServices/shared/testing-libraries/device-side/java/com/android/adservices/shared/meta_testing/
DAndroidStaticMockerTestCase.java8 * http://www.apache.org/licenses/LICENSE-2.0
31 import com.android.modules.utils.build.SdkLevel;
32 import com.android.modules.utils.testing.ExtendedMockitoRule.SpyStatic;
72 assertFailsWhenClassNotSpied(Binder.class, () -> getMocker().mockGetCallingUidOrThrow()); in testMockGetCallingUidOrThrow_noArgs_notSpied()
82 expect.withMessage("uid").that(Binder.getCallingUidOrThrow()).isEqualTo(myUid); in testMockGetCallingUidOrThrow_noArgs()
87 assertFailsWhenClassNotSpied(Binder.class, () -> getMocker().mockGetCallingUidOrThrow(42)); in testMockGetCallingUidOrThrow_notSpied()
95 expect.withMessage("uid").that(Binder.getCallingUidOrThrow()).isEqualTo(42); in testMockGetCallingUidOrThrow()
102 expect.withMessage("isAtLeastR()").that(SdkLevel.isAtLeastR()).isTrue(); in testMockIsAtLeastR()
105 expect.withMessage("isAtLeastR()").that(SdkLevel.isAtLeastR()).isFalse(); in testMockIsAtLeastR()
112 expect.withMessage("isAtLeastS()").that(SdkLevel.isAtLeastS()).isTrue(); in testMockIsAtLeastS()
[all …]
/aosp_15_r20/device/google/felix/vibrator/common/
DHardwareBase.cpp8 * http://www.apache.org/licenses/LICENSE-2.0
25 #include "utils.h"
46 for (auto &entry : utils::pathsFromEnv("HWAPI_DEBUG_PATHS", mPathPrefix)) { in debug()
63 dprintf(fd, " %s\n", r->toString(mNames).c_str()); in debug()
88 utils::fileFromEnv("CALIBRATION_FILEPATH", &calfile); in HwCalBase()
97 mCalData[utils::trim(key)] = utils::trim(value); in HwCalBase()
102 utils::fileFromEnv("CALIBRATION_FILEPATH_DUAL", &calfile_dual); in HwCalBase()
111 key = utils::trim(key) + "_dual"; in HwCalBase()
112 mCalData[key] = utils::trim(value); in HwCalBase()
130 HwCalBase *obj = context->obj; in debug()
[all …]
/aosp_15_r20/external/python/pycparser/utils/benchmark/inputs/
Dtccgen.c.ppout2 # 1 "<built-in>"
3 # 1 "<command-line>"
11 # 1 "/usr/local/google/home/eliben/eli/pycparser/utils/fake_libc_include/stdlib.h" 1
12 # 1 "/usr/local/google/home/eliben/eli/pycparser/utils/fake_libc_include/_fake_defines.h" 1
13 # 2 "/usr/local/google/home/eliben/eli/pycparser/utils/fake_libc_include/stdlib.h" 2
14 # 1 "/usr/local/google/home/eliben/eli/pycparser/utils/fake_libc_include/_fake_typedefs.h" 1
185 # 2 "/usr/local/google/home/eliben/eli/pycparser/utils/fake_libc_include/stdlib.h" 2
187 # 1 "/usr/local/google/home/eliben/eli/pycparser/utils/fake_libc_include/stdio.h" 1
188 # 1 "/usr/local/google/home/eliben/eli/pycparser/utils/fake_libc_include/_fake_defines.h" 1
189 # 2 "/usr/local/google/home/eliben/eli/pycparser/utils/fake_libc_include/stdio.h" 2
[all …]
/aosp_15_r20/external/rust/android-crates-io/crates/clap_complete/src/shells/
Dzsh.rs5 use crate::generator::{utils, Generator};
13 fn file_name(&self, name: &str) -> String { in file_name()
20 .expect("crate::generate should have set the bin_name"); in generate()
27 autoload -U is-at-least in generate()
30 typeset -A opt_args in generate()
31 typeset -a _arguments_options in generate()
34 if is-at-least 5.2; then in generate()
35 _arguments_options=(-s -S -C) in generate()
37 _arguments_options=(-s -C) in generate()
68 // _describe -t commands '[bin_name] commands' commands "$@"
[all …]
/aosp_15_r20/external/aws-sdk-java-v2/http-clients/url-connection-client/src/main/java/software/amazon/awssdk/http/urlconnection/
H A DUrlConnectionHttpClient.java22 import static software.amazon.awssdk.utils.FunctionalUtils.invokeSafely;
23 import static software.amazon.awssdk.utils.NumericUtils.saturatedCast;
68 import software.amazon.awssdk.utils.AttributeMap;
69 import software.amazon.awssdk.utils.IoUtils;
70 import software.amazon.awssdk.utils.Logger;
71 import software.amazon.awssdk.utils.StringUtils;
72 import software.amazon.awssdk.utils.Validate;
104 this.connectionFactory = url -> createDefaultConnection(url, socketFactory); in UrlConnectionHttpClient()
157 …// connection.setRequestProperty("Transfer-Encoding", "chunked") does not work, i.e., property doe… in createAndConfigureConnection()
158 if (sdkHttpRequest.matchingHeaders("Transfer-Encoding").contains("chunked")) { in createAndConfigureConnection()
[all …]
/aosp_15_r20/hardware/interfaces/broadcastradio/2.0/vts/functional/
H A DVtsHalBroadcastradioV2_0TargetTest.cpp8 * http://www.apache.org/licenses/LICENSE-2.0
19 #include <android-base/logging.h>
20 #include <android-base/strings.h>
25 #include <broadcastradio-utils-2x/Utils.h>
26 #include <broadcastradio-vts-utils/call-barrier.h>
27 #include <broadcastradio-vts-utils/mock-timeout.h>
28 #include <broadcastradio-vts-utils/pointer-utils.h>
58 using utils::make_identifier;
59 using utils::make_selector_amfm;
96 utils::ProgramInfoSet mProgramList;
[all …]
/aosp_15_r20/packages/modules/AdServices/adservices/tests/unittest/ui/src/com/android/adservices/service/consent/
DAppConsentStorageManagerTest.java8 * http://www.apache.org/licenses/LICENSE-2.0
50 import com.android.modules.utils.build.SdkLevel;
51 import com.android.modules.utils.testing.ExtendedMockitoRule.SpyStatic;
116 () -> in testAppNotFoundException()
126 expect.that( in testClearAllAppConsentData()
138 expect.that(mAppDaoDatastore.getBoolean(AppConsentDaoFixture.APP10_DATASTORE_KEY)) in testClearConsentForUninstalledApp()
142 expect.that(mAppDaoDatastore.getBoolean(AppConsentDaoFixture.APP10_DATASTORE_KEY)).isNull(); in testClearConsentForUninstalledApp()
154 expect.that(mAppDaoDatastore.getBoolean(AppConsentDaoFixture.APP10_DATASTORE_KEY)).isTrue(); in testClearConsentForUninstalledAppWithoutUid()
155 expect.that(mAppDaoDatastore.getBoolean(AppConsentDaoFixture.APP20_DATASTORE_KEY)).isNull(); in testClearConsentForUninstalledAppWithoutUid()
156 expect.that(mAppDaoDatastore.getBoolean(AppConsentDaoFixture.APP30_DATASTORE_KEY)) in testClearConsentForUninstalledAppWithoutUid()
[all …]
/aosp_15_r20/external/openthread/src/lib/url/
H A Durl.cpp35 #include "lib/utils/utils.hpp"
57 EXPECT(url != nullptr, error = OT_ERROR_PARSE); in Init()
59 url += sizeof("://") - 1; in Init()
70 cur[-1] = '\0'; in Init()
94 EXPECT(aLastValue > mQuery && aLastValue < mEnd, NO_ACTION); in GetValue()
127 EXPECT((str = GetValue(aName)) != nullptr, error = OT_ERROR_NOT_FOUND); in ParseUint32()
130 EXPECT(0 <= value && value <= UINT32_MAX, error = OT_ERROR_INVALID_ARGS); in ParseUint32()
143 EXPECT(value <= UINT16_MAX, error = OT_ERROR_INVALID_ARGS); in ParseUint16()
156 EXPECT(value <= UINT8_MAX, error = OT_ERROR_INVALID_ARGS); in ParseUint8()
169 EXPECT((str = GetValue(aName)) != nullptr, error = OT_ERROR_NOT_FOUND); in ParseInt32()
[all …]
/aosp_15_r20/external/flashrom/util/flashrom_tester/src/
H A Dtester.rs38 use super::utils::{self, LayoutSizes};
49 // type-signature comes from the return type of lib.rs workers.
65 /// The path to a file containing flash-sized random data
76 ) -> Result<Self, FlashromError> { in create()
81 layout: utils::get_layout_sizes(rom_sz)?, in create()
95 info!("Generating random flash-sized data"); in create()
102 pub fn run_test<T: TestCase>(&mut self, test: T) -> TestResult { in run_test()
110 pub fn chip_type(&self) -> FlashChip { in chip_type()
118 pub fn random_data_file(&self) -> &Path { in random_data_file()
122 pub fn layout(&self) -> &LayoutSizes { in layout()
[all …]
/aosp_15_r20/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/download/
DEncryptionDataDownloadManagerTest.java8 * http://www.apache.org/licenses/LICENSE-2.0
44 import com.android.modules.utils.testing.ExtendedMockitoRule.MockStatic;
45 import com.android.modules.utils.testing.ExtendedMockitoRule.SpyStatic;
87 doReturn(mMockMdd).when(() -> (MobileDataDownloadFactory.getMdd(any()))); in setup()
103 expect.that(firstInstance).isNotNull(); in testGetInstance()
104 expect.that(secondInstance).isNotNull(); in testGetInstance()
105 expect.that(firstInstance).isSameInstanceAs(secondInstance); in testGetInstance()
129 expect.that(mEncryptionDataDownloadManager.readAndInsertEncryptionDataFromMdd().get()) in testReadFileAndInsertIntoDatabaseSuccess()
133 expect.that(databaseKeys).hasSize(3); in testReadFileAndInsertIntoDatabaseSuccess()
163 expect.that(mEncryptionDataDownloadManager.readAndInsertEncryptionDataFromMdd().get()) in testReadFileAndInsertIntoDatabaseSuccess_keysUpdated()
[all …]

12345678910>>...45