<commit_before>/* Copyright 2022 The Chromium OS Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include <ztest.h>

#include "charge_manager.h"
#include "ec_commands.h"
#include "test_state.h"

ZTEST_SUITE(charge_manager, drivers_predicate_post_main, NULL, NULL, NULL,
	    NULL);

/**
 * Test the default implementation of board_fill_source_power_info(). This
 * function should reset all the power info values. If this test overrides this
 * function, this test can be removed.
 */
ZTEST_USER(charge_manager, test_default_fill_power_info)
{
	struct ec_response_usb_pd_power_info info = {
		.meas = {
			.voltage_now = 10,
			.voltage_max = 10,
			.current_max = 10,
			.current_lim = 10,
		},
		.max_power = 10,<commit_msg>zephyr: Fix comment on test function<commit_after>/* Copyright 2022 The Chromium OS Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include <ztest.h>

#include "charge_manager.h"
#include "ec_commands.h"
#include "test_state.h"

ZTEST_SUITE(charge_manager, drivers_predicate_post_main, NULL, NULL, NULL,
	    NULL);

/**
 * Test the default implementation of board_fill_source_power_info(). The fill
 * function should reset all the power info values. If the test binary overrides
 * board_fill_source_power_info(), then this test can be removed.
 */
ZTEST_USER(charge_manager, test_default_fill_power_info)
{
	struct ec_response_usb_pd_power_info info = {
		.meas = {
			.voltage_now = 10,
			.voltage_max = 10,
			.current_max = 10,
			.current_lim = 10,
		},
		.max_power = 10,
{'fraction_non_alphanumeric': 0.09295441089402014, 'fraction_numerical': 0.016577856719952634, 'mean_word_length': 4.184049079754601, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4879473', 'n_tokens_mistral': 607, 'n_tokens_neox': 548, 'n_words': 176}