/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/framework/test/ |
H A D | constant_test.cpp | 64 auto tokens = Constant::Split("", ",");
in HWTEST_F() local 65 ASSERT_EQ(tokens.size(), 1);
in HWTEST_F() 66 EXPECT_EQ(tokens[0], "");
in HWTEST_F() 78 auto tokens = Constant::Split("abc_123", "_");
in HWTEST_F() local 79 ASSERT_EQ(tokens.size(), 2);
in HWTEST_F() 80 EXPECT_EQ(tokens[0], "abc");
in HWTEST_F() 81 EXPECT_EQ(tokens[1], "123");
in HWTEST_F() 93 auto tokens = Constant::Split("#abc123", "#");
in HWTEST_F() local 94 ASSERT_EQ(tokens.size(), 2);
in HWTEST_F() 95 EXPECT_EQ(tokens[ in HWTEST_F() 108 auto tokens = Constant::Split("abc123!", "!"); HWTEST_F() local 122 auto tokens = Constant::Split("abc!123!", "!"); HWTEST_F() local 137 auto tokens = Constant::Split("abc123", "^"); HWTEST_F() local 151 auto tokens = Constant::Split("abc$$$123", "$"); HWTEST_F() local 168 auto tokens = Constant::Split("abc&&&123", "&&"); HWTEST_F() local [all...] |
/foundation/ai/intelligent_voice_framework/services/intell_voice_engine/server/update/ |
H A D | update_engine_utils.cpp | 63 std::vector<std::string> tokens; in GetWakeupVesion() local 64 StringUtil::Split(wakeupVersion, "v.", tokens); in GetWakeupVesion() 65 if (tokens.size() != WAKEUP_VERSION_SPLIT_NUM || tokens[1].empty()) { in GetWakeupVesion() 66 INTELL_VOICE_LOG_INFO("wakeupVersion split empty (%{public}zu)", tokens.size()); in GetWakeupVesion() 70 std::string version = tokens[1]; in GetWakeupVesion() 71 tokens.resize(0); in GetWakeupVesion() 72 StringUtil::Split(version, ".", tokens); in GetWakeupVesion() 73 if (tokens.size() != WAKEUP_VERSION_NUMBERS) { in GetWakeupVesion() 78 for (size_t index = 0; index < tokens in GetWakeupVesion() [all...] |
/kernel/linux/linux-6.6/rust/macros/ |
H A D | quote.rs | 6 fn to_tokens(&self, tokens: &mut TokenStream); in to_tokens() 10 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens() 12 v.to_tokens(tokens); in to_tokens() 18 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens() 19 tokens.extend([TokenTree::from(self.clone())]); in to_tokens() 24 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens() 25 tokens.extend([self.clone()]); in to_tokens() 30 fn to_tokens(&self, tokens: &mut TokenStream) { in to_tokens() 31 tokens.extend(self.clone()); in to_tokens() 35 /// Converts tokens int 43 let mut tokens; global() variables 68 let mut tokens = ::std::vec::Vec::new(); global() variables 77 let mut tokens = ::std::vec::Vec::new(); global() variables 86 let mut tokens = ::std::vec::Vec::new(); global() variables [all...] |
H A D | paste.rs | 5 fn concat(tokens: &[TokenTree], group_span: Span) -> TokenTree { in concat() 6 let mut tokens = tokens.iter(); in concat() variables 10 match tokens.next() { in concat() 21 let Some(TokenTree::Ident(ident)) = tokens.next() else { in concat() 49 pub(crate) fn expand(tokens: &mut Vec<TokenTree>) { 50 for token in tokens.iter_mut() { 64 // Recursively expand tokens inside the group 74 for i in (0..tokens.len().saturating_sub(3)).rev() { 77 (&tokens[ [all...] |
H A D | vtable.rs | 8 let mut tokens: Vec<_> = ts.into_iter().collect(); variables 11 let is_trait = tokens 24 let body = match tokens.pop() { 94 tokens.push(TokenTree::Group(Group::new(Delimiter::Brace, new_body))); 95 tokens.into_iter().collect()
|
/foundation/ability/ability_runtime/interfaces/inner_api/app_manager/src/appmgr/ |
H A D | ability_debug_response_proxy.cpp | 40 void AbilityDebugResponseProxy::OnAbilitysDebugStarted(const std::vector<sptr<IRemoteObject>> &tokens) in OnAbilitysDebugStarted() argument 43 SendRequest(IAbilityDebugResponse::Message::ON_ABILITYS_DEBUG_STARTED, tokens); in OnAbilitysDebugStarted() 46 void AbilityDebugResponseProxy::OnAbilitysDebugStoped(const std::vector<sptr<IRemoteObject>> &tokens) in OnAbilitysDebugStoped() argument 49 SendRequest(IAbilityDebugResponse::Message::ON_ABILITYS_DEBUG_STOPED, tokens); in OnAbilitysDebugStoped() 53 const std::vector<sptr<IRemoteObject>> &tokens, bool isAssertDebug) in OnAbilitysAssertDebugChange() 62 if (tokens.size() <= CYCLE_LIMIT_MIN || tokens.size() > CYCLE_LIMIT_MAX || in OnAbilitysAssertDebugChange() 63 !data.WriteInt32(tokens.size())) { in OnAbilitysAssertDebugChange() 68 for (const auto &item : tokens) { in OnAbilitysAssertDebugChange() 95 const IAbilityDebugResponse::Message &message, const std::vector<sptr<IRemoteObject>> &tokens) in SendRequest() 52 OnAbilitysAssertDebugChange( const std::vector<sptr<IRemoteObject>> &tokens, bool isAssertDebug) OnAbilitysAssertDebugChange() argument 94 SendRequest( const IAbilityDebugResponse::Message &message, const std::vector<sptr<IRemoteObject>> &tokens) SendRequest() argument [all...] |
H A D | ability_debug_response_stub.cpp | 41 std::vector<sptr<IRemoteObject>> tokens; in HandleOnAbilitysDebugStarted() local 48 tokens.push_back(token); in HandleOnAbilitysDebugStarted() 50 OnAbilitysDebugStarted(tokens); in HandleOnAbilitysDebugStarted() 62 std::vector<sptr<IRemoteObject>> tokens; in HandleOnAbilitysDebugStoped() local 69 tokens.push_back(token); in HandleOnAbilitysDebugStoped() 71 OnAbilitysDebugStoped(tokens); in HandleOnAbilitysDebugStoped() 83 std::vector<sptr<IRemoteObject>> tokens; in HandleOnAbilitysAssertDebugChange() local 90 tokens.push_back(token); in HandleOnAbilitysAssertDebugChange() 93 OnAbilitysAssertDebugChange(tokens, isAssertDebug); in HandleOnAbilitysAssertDebugChange()
|
/foundation/ability/ability_runtime/services/abilitymgr/src/ |
H A D | ability_debug_deal.cpp | 37 void AbilityDebugDeal::OnAbilitysDebugStarted(const std::vector<sptr<IRemoteObject>> &tokens) in OnAbilitysDebugStarted() argument 40 for (auto &token : tokens) { in OnAbilitysDebugStarted() 50 void AbilityDebugDeal::OnAbilitysDebugStoped(const std::vector<sptr<IRemoteObject>> &tokens) in OnAbilitysDebugStoped() argument 53 for (auto &token : tokens) { in OnAbilitysDebugStoped() 63 void AbilityDebugDeal::OnAbilitysAssertDebugChange(const std::vector<sptr<IRemoteObject>> &tokens, bool isAssertDebug) in OnAbilitysAssertDebugChange() argument 67 for (const auto &token : tokens) { in OnAbilitysAssertDebugChange() 77 void AbilityDebugResponse::OnAbilitysDebugStarted(const std::vector<sptr<IRemoteObject>> &tokens) in OnAbilitysDebugStarted() argument 79 if (tokens.empty()) { in OnAbilitysDebugStarted() 80 TAG_LOGW(AAFwkTag::ABILITYMGR, "tokens empty"); in OnAbilitysDebugStarted() 89 deal->OnAbilitysDebugStarted(tokens); in OnAbilitysDebugStarted() 92 OnAbilitysDebugStoped(const std::vector<sptr<IRemoteObject>> &tokens) OnAbilitysDebugStoped() argument 107 OnAbilitysAssertDebugChange( const std::vector<sptr<IRemoteObject>> &tokens, bool isAssertDebug) OnAbilitysAssertDebugChange() argument [all...] |
/kernel/linux/linux-5.10/tools/perf/pmu-events/ |
H A D | jsmn.c | 32 jsmntok_t *tokens, size_t num_tokens) in jsmn_alloc_token() 38 tok = &tokens[parser->toknext++]; in jsmn_alloc_token() 61 jsmntok_t *tokens, size_t num_tokens) in jsmn_parse_primitive() 103 token = jsmn_alloc_token(parser, tokens, num_tokens); in jsmn_parse_primitive() 118 jsmntok_t *tokens, size_t num_tokens) in jsmn_parse_string() 131 token = jsmn_alloc_token(parser, tokens, num_tokens); in jsmn_parse_string() 171 * Parse JSON string and fill tokens. 174 jsmntok_t *tokens, unsigned int num_tokens) in jsmn_parse() 188 token = jsmn_alloc_token(parser, tokens, num_tokens); in jsmn_parse() 192 tokens[parse in jsmn_parse() 31 jsmn_alloc_token(jsmn_parser *parser, jsmntok_t *tokens, size_t num_tokens) jsmn_alloc_token() argument 59 jsmn_parse_primitive(jsmn_parser *parser, const char *js, size_t len, jsmntok_t *tokens, size_t num_tokens) jsmn_parse_primitive() argument 116 jsmn_parse_string(jsmn_parser *parser, const char *js, size_t len, jsmntok_t *tokens, size_t num_tokens) jsmn_parse_string() argument 173 jsmn_parse(jsmn_parser *parser, const char *js, size_t len, jsmntok_t *tokens, unsigned int num_tokens) jsmn_parse() argument [all...] |
H A D | json.c | 80 * Parse json file using jsmn. Return array of tokens, 86 jsmntok_t *tokens; in parse_json() local 95 tokens = malloc(sz); in parse_json() 96 if (!tokens) in parse_json() 99 res = jsmn_parse(&parser, *map, *size, tokens, in parse_json() 107 return tokens; in parse_json() 109 free(tokens); in parse_json() 115 void free_json(char *map, size_t size, jsmntok_t *tokens) in free_json() argument 117 free(tokens); in free_json()
|
/foundation/ability/ability_runtime/services/abilitymgr/include/ |
H A D | ability_debug_deal.h | 31 * @param tokens The token of ability records. 33 void OnAbilitysDebugStarted(const std::vector<sptr<IRemoteObject>> &tokens); 37 * @param tokens The token of ability records. 39 void OnAbilitysDebugStoped(const std::vector<sptr<IRemoteObject>> &tokens); 43 * @param tokens The token of ability records. 46 void OnAbilitysAssertDebugChange(const std::vector<sptr<IRemoteObject>> &tokens, bool isAssertDebug); 63 void OnAbilitysDebugStarted(const std::vector<sptr<IRemoteObject>> &tokens) override; 64 void OnAbilitysDebugStoped(const std::vector<sptr<IRemoteObject>> &tokens) override; 65 void OnAbilitysAssertDebugChange(const std::vector<sptr<IRemoteObject>> &tokens, bool isAssertDebug) override;
|
/foundation/ability/ability_runtime/test/fuzztest/abilitydebugresponseproxy_fuzzer/ |
H A D | abilitydebugresponseproxy_fuzzer.cpp | 73 std::vector<sptr<IRemoteObject>> tokens; in AbilityDebugResponseProxyFuzztest1() local 74 proxy->OnAbilitysDebugStarted(tokens); // branch in AbilityDebugResponseProxyFuzztest1() 75 proxy->OnAbilitysDebugStoped(tokens); // branch in AbilityDebugResponseProxyFuzztest1() 76 proxy->OnAbilitysAssertDebugChange(tokens, boolParam); // branch in AbilityDebugResponseProxyFuzztest1() 78 tokens.emplace_back(token); in AbilityDebugResponseProxyFuzztest1() 79 proxy->SendRequest(static_cast<IAbilityDebugResponse::Message>(int32Param), tokens); // branch tokens no empty. in AbilityDebugResponseProxyFuzztest1() local 80 tokens.clear(); in AbilityDebugResponseProxyFuzztest1() 81 proxy->SendRequest(static_cast<IAbilityDebugResponse::Message>(int32Param), tokens); // branch tokens empt in AbilityDebugResponseProxyFuzztest1() local [all...] |
/kernel/linux/linux-5.10/scripts/ |
H A D | asn1_compiler.c | 348 struct token *tokens; in tokenise() local 352 /* Assume we're going to have half as many tokens as we have in tokenise() 355 token_list = tokens = calloc((end - buffer) / 2, sizeof(struct token)); in tokenise() 356 if (!tokens) { in tokenise() 407 tokens[tix].line = lineno; in tokenise() 410 /* Handle string tokens */ in tokenise() 420 tokens[tix].size = q - p; in tokenise() 423 tokens[tix].content = malloc(tokens[tix].size + 1); in tokenise() 424 if (!tokens[ti in tokenise() [all...] |
/kernel/linux/linux-6.6/scripts/ |
H A D | asn1_compiler.c | 348 struct token *tokens; in tokenise() local 352 /* Assume we're going to have half as many tokens as we have in tokenise() 355 token_list = tokens = calloc((end - buffer) / 2, sizeof(struct token)); in tokenise() 356 if (!tokens) { in tokenise() 407 tokens[tix].line = lineno; in tokenise() 410 /* Handle string tokens */ in tokenise() 420 tokens[tix].size = q - p; in tokenise() 423 tokens[tix].content = malloc(tokens[tix].size + 1); in tokenise() 424 if (!tokens[ti in tokenise() [all...] |
/foundation/ability/ability_runtime/test/unittest/ability_debug_response_proxy_test/ |
H A D | ability_debug_response_proxy_test.cpp | 67 std::vector<sptr<IRemoteObject>> tokens; in HWTEST_F() local 70 tokens.push_back(token); in HWTEST_F() 72 proxy->OnAbilitysDebugStarted(tokens); in HWTEST_F() 89 std::vector<sptr<IRemoteObject>> tokens; in HWTEST_F() local 92 tokens.push_back(token); in HWTEST_F() 95 proxy->OnAbilitysDebugStarted(tokens); in HWTEST_F()
|
/foundation/ability/ability_runtime/test/fuzztest/abilitydebugdeal_fuzzer/ |
H A D | abilitydebugdeal_fuzzer.cpp | 79 std::vector<sptr<IRemoteObject>> tokens; in DoSomethingInterestingWithMyAPI() local 82 abilityDebugDeal->OnAbilitysDebugStarted(tokens); in DoSomethingInterestingWithMyAPI() 83 abilityDebugDeal->OnAbilitysDebugStoped(tokens); in DoSomethingInterestingWithMyAPI() 84 abilityDebugDeal->OnAbilitysAssertDebugChange(tokens, boolParam); in DoSomethingInterestingWithMyAPI() 88 abilityDebugResponse->OnAbilitysDebugStarted(tokens); in DoSomethingInterestingWithMyAPI() 89 abilityDebugResponse->OnAbilitysDebugStoped(tokens); in DoSomethingInterestingWithMyAPI() 90 abilityDebugResponse->OnAbilitysAssertDebugChange(tokens, boolParam); in DoSomethingInterestingWithMyAPI()
|
/foundation/ability/ability_runtime/test/fuzztest/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer/ |
H A D | abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer.cpp | 72 std::vector<sptr<IRemoteObject>> tokens; in DoSomethingInterestingWithMyAPI() local 73 infosProxy->OnAbilitysDebugStarted(tokens); in DoSomethingInterestingWithMyAPI() 74 infosProxy->OnAbilitysDebugStoped(tokens); in DoSomethingInterestingWithMyAPI() 76 infosProxy->OnAbilitysAssertDebugChange(tokens, isAssertDebug); in DoSomethingInterestingWithMyAPI() 83 infosProxy->SendRequest(message, tokens); in DoSomethingInterestingWithMyAPI() 85 infosProxy->SendRequest(message, tokens); in DoSomethingInterestingWithMyAPI() 87 infosProxy->SendRequest(message, tokens); in DoSomethingInterestingWithMyAPI()
|
/foundation/ability/ability_runtime/interfaces/inner_api/app_manager/include/appmgr/ |
H A D | ability_debug_response_proxy.h | 32 * @param tokens The token of ability token. 34 void OnAbilitysDebugStarted(const std::vector<sptr<IRemoteObject>> &tokens) override; 38 * @param tokens The token of ability token. 40 void OnAbilitysDebugStoped(const std::vector<sptr<IRemoteObject>> &tokens) override; 44 * @param tokens The token of ability records. 47 void OnAbilitysAssertDebugChange(const std::vector<sptr<IRemoteObject>> &tokens, bool isAssertDebug) override; 51 void SendRequest(const IAbilityDebugResponse::Message &message, const std::vector<sptr<IRemoteObject>> &tokens);
|
H A D | ability_debug_response_interface.h | 29 * @param tokens The token of ability token. 31 virtual void OnAbilitysDebugStarted(const std::vector<sptr<IRemoteObject>> &tokens) = 0; 35 * @param tokens The token of ability token. 37 virtual void OnAbilitysDebugStoped(const std::vector<sptr<IRemoteObject>> &tokens) = 0; 41 * @param tokens The token of ability records. 44 virtual void OnAbilitysAssertDebugChange(const std::vector<sptr<IRemoteObject>> &tokens, bool isAssertDebug) = 0;
|
/kernel/linux/linux-6.6/net/netfilter/ |
H A D | nft_limit.c | 20 u64 tokens; member 34 u64 now, tokens; in nft_limit_eval() local 39 tokens = priv->limit->tokens + now - priv->limit->last; in nft_limit_eval() 40 if (tokens > priv->tokens_max) in nft_limit_eval() 41 tokens = priv->tokens_max; in nft_limit_eval() 44 delta = tokens - cost; in nft_limit_eval() 46 priv->limit->tokens = delta; in nft_limit_eval() 50 priv->limit->tokens = tokens; in nft_limit_eval() 61 u64 unit, tokens, rate_with_burst; nft_limit_init() local [all...] |
/kernel/linux/linux-5.10/drivers/net/wireguard/ |
H A D | ratelimiter.c | 27 u64 last_time_ns, tokens, ip; member 113 u64 now, tokens; in wg_ratelimiter_allow() local 117 * the burst as part of the maximum tokens, rather than in wg_ratelimiter_allow() 122 tokens = min_t(u64, TOKEN_MAX, in wg_ratelimiter_allow() 123 entry->tokens + now - in wg_ratelimiter_allow() 126 ret = tokens >= PACKET_COST; in wg_ratelimiter_allow() 127 entry->tokens = ret ? tokens - PACKET_COST : tokens; in wg_ratelimiter_allow() 147 entry->tokens in wg_ratelimiter_allow() [all...] |
/kernel/linux/linux-6.6/drivers/net/wireguard/ |
H A D | ratelimiter.c | 27 u64 last_time_ns, tokens, ip; member 113 u64 now, tokens; in wg_ratelimiter_allow() local 117 * the burst as part of the maximum tokens, rather than in wg_ratelimiter_allow() 122 tokens = min_t(u64, TOKEN_MAX, in wg_ratelimiter_allow() 123 entry->tokens + now - in wg_ratelimiter_allow() 126 ret = tokens >= PACKET_COST; in wg_ratelimiter_allow() 127 entry->tokens = ret ? tokens - PACKET_COST : tokens; in wg_ratelimiter_allow() 147 entry->tokens in wg_ratelimiter_allow() [all...] |
/kernel/linux/linux-5.10/net/netfilter/ |
H A D | nft_limit.c | 20 u64 tokens; member 30 u64 now, tokens; in nft_limit_eval() local 35 tokens = limit->tokens + now - limit->last; in nft_limit_eval() 36 if (tokens > limit->tokens_max) in nft_limit_eval() 37 tokens = limit->tokens_max; in nft_limit_eval() 40 delta = tokens - cost; in nft_limit_eval() 42 limit->tokens = delta; in nft_limit_eval() 46 limit->tokens = tokens; in nft_limit_eval() 57 u64 unit, tokens; nft_limit_init() local [all...] |
/kernel/linux/linux-6.6/sound/soc/sof/ |
H A D | topology.c | 17 #include <uapi/sound/sof/tokens.h> 40 * sof_update_ipc_object - Parse multiple sets of tokens within the token array associated with the 59 const struct sof_topology_token *tokens; in sof_update_ipc_object() local 72 /* No tokens to match */ in sof_update_ipc_object() 76 tokens = token_list[token_id].tokens; in sof_update_ipc_object() 77 if (!tokens) { in sof_update_ipc_object() 78 dev_err(scomp->dev, "Invalid tokens for token id: %d\n", token_id); in sof_update_ipc_object() 87 if (tokens[i].token == tuples[j].token) { in sof_update_ipc_object() 88 switch (tokens[ in sof_update_ipc_object() 446 sof_parse_uuid_tokens(struct snd_soc_component *scomp, void *object, size_t offset, const struct sof_topology_token *tokens, int num_tokens, struct snd_soc_tplg_vendor_array *array) sof_parse_uuid_tokens() argument 500 const struct sof_topology_token *tokens; sof_copy_tuples() local 613 sof_parse_string_tokens(struct snd_soc_component *scomp, void *object, int offset, const struct sof_topology_token *tokens, int num_tokens, struct snd_soc_tplg_vendor_array *array) sof_parse_string_tokens() argument 659 sof_parse_word_tokens(struct snd_soc_component *scomp, void *object, int offset, const struct sof_topology_token *tokens, int num_tokens, struct snd_soc_tplg_vendor_array *array) sof_parse_word_tokens() argument 710 sof_parse_token_sets(struct snd_soc_component *scomp, void *object, const struct sof_topology_token *tokens, int count, struct snd_soc_tplg_vendor_array *array, int array_size, int token_instance_num, size_t object_size) sof_parse_token_sets() argument 796 sof_parse_tokens(struct snd_soc_component *scomp, void *object, const struct sof_topology_token *tokens, int num_tokens, struct snd_soc_tplg_vendor_array *array, int array_size) sof_parse_tokens() argument [all...] |
/foundation/ability/ability_runtime/frameworks/native/appkit/app/ |
H A D | ability_record_mgr.cpp | 114 * @brief Get the all tokens in the abilityRecordMgr. 116 * @return all tokens in the abilityRecordMgr. 121 std::vector<sptr<IRemoteObject>> tokens; in GetAllTokens() local 124 tokens.emplace_back(token); in GetAllTokens() 126 return tokens; in GetAllTokens()
|