fix: correct typos and improve comments across multiple files by codespell (#4116)
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
@ -103,7 +103,7 @@ class AOTTest : public testing::Test
|
||||
// accessed from sub-classes.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
virtual void SetUp()
|
||||
{
|
||||
|
||||
@ -44,7 +44,7 @@ class aot_compiler_test_suit : public testing::Test
|
||||
// accessed from sub-classes.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
virtual void SetUp() {}
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ class aot_emit_aot_file_test_suite : public testing::Test
|
||||
// accessed from sub-classes.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
virtual void SetUp() {}
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ class aot_emit_control_test_suite : public testing::Test
|
||||
// accessed from sub-classes.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
virtual void SetUp() {}
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ class aot_emit_function_test_suite : public testing::Test
|
||||
// accessed from sub-classes.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
virtual void SetUp() {}
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ class aot_emit_numberic_test_suite : public testing::Test
|
||||
// accessed from sub-classes.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
virtual void SetUp() {}
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ class aot_emit_parametric_test_suite : public testing::Test
|
||||
// accessed from sub-classes.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
virtual void SetUp() {}
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ class aot_emit_table_test_suite : public testing::Test
|
||||
// accessed from sub-classes.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
virtual void SetUp() {}
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ class aot_llvm_test_suite : public testing::Test
|
||||
// accessed from sub-classes.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
virtual void SetUp() {}
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ class CustomSectionTest : public testing::Test
|
||||
// accessed from sub-classes.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
virtual void SetUp() {}
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ class InterpreterTest : public testing::Test
|
||||
// accessed from sub-classes.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
virtual void SetUp()
|
||||
{
|
||||
|
||||
@ -32,7 +32,7 @@ class LibcBuiltinTest : public testing::Test
|
||||
// accessed from sub-classes.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
virtual void SetUp()
|
||||
{
|
||||
@ -88,8 +88,8 @@ TEST_F(LibcBuiltinTest, puts)
|
||||
|
||||
/* Capture the stdout */
|
||||
testing::internal::CaptureStdout();
|
||||
EXPECT_EQ(CALL_FUNC(puts, "Hello Wrold"), strlen("Hello Wrold\n"));
|
||||
EXPECT_EQ(testing::internal::GetCapturedStdout(), "Hello Wrold\n");
|
||||
EXPECT_EQ(CALL_FUNC(puts, "Hello World"), strlen("Hello World\n"));
|
||||
EXPECT_EQ(testing::internal::GetCapturedStdout(), "Hello World\n");
|
||||
|
||||
testing::internal::CaptureStdout();
|
||||
EXPECT_EQ(CALL_FUNC(puts, "c"), strlen("c\n"));
|
||||
@ -113,9 +113,9 @@ TEST_F(LibcBuiltinTest, printf)
|
||||
|
||||
/* Capture the stdout */
|
||||
testing::internal::CaptureStdout();
|
||||
EXPECT_EQ(CALL_FUNC(printf, "Hello Wrold", empty_va_list.get()),
|
||||
strlen("Hello Wrold"));
|
||||
EXPECT_EQ(testing::internal::GetCapturedStdout(), "Hello Wrold");
|
||||
EXPECT_EQ(CALL_FUNC(printf, "Hello World", empty_va_list.get()),
|
||||
strlen("Hello World"));
|
||||
EXPECT_EQ(testing::internal::GetCapturedStdout(), "Hello World");
|
||||
|
||||
testing::internal::CaptureStdout();
|
||||
EXPECT_EQ(CALL_FUNC(printf, "c", empty_va_list.get()), strlen("c"));
|
||||
@ -290,7 +290,7 @@ TEST_F(LibcBuiltinTest, printf)
|
||||
va_list.add(0x7FFFFFFF); //%ld 2147483647 - sing long
|
||||
va_list.add(0xFFFFFFFF); //%lu 4294967295 -unsigned long
|
||||
va_list.add(0x7FFFFFFFFFFFFFFF); //%lld 9223372036854775807 sing long long
|
||||
va_list.add(0xFFFFFFFFFFFFFFFF);//%llu 18446744073709551615 unsiged long long
|
||||
va_list.add(0xFFFFFFFFFFFFFFFF);//%llu 18446744073709551615 unsigned long long
|
||||
|
||||
testing::internal::CaptureStdout();
|
||||
|
||||
@ -300,17 +300,17 @@ TEST_F(LibcBuiltinTest, printf)
|
||||
/* clang-format on */
|
||||
}
|
||||
|
||||
EXPECT_EQ(CALL_FUNC(printf, "Hello Wrold", 0), 0);
|
||||
EXPECT_EQ(CALL_FUNC(printf, "Hello World", 0), 0);
|
||||
EXPECT_STREQ(dummy_exec_env.get_exception(),
|
||||
"Exception: out of bounds memory access");
|
||||
dummy_exec_env.clear_exception();
|
||||
|
||||
EXPECT_EQ(CALL_FUNC(printf, "Hello Wrold", NULL), 0);
|
||||
EXPECT_EQ(CALL_FUNC(printf, "Hello World", NULL), 0);
|
||||
EXPECT_STREQ(dummy_exec_env.get_exception(),
|
||||
"Exception: out of bounds memory access");
|
||||
dummy_exec_env.clear_exception();
|
||||
|
||||
EXPECT_EQ(CALL_FUNC(printf, "Hello Wrold", (char *)-1), 0);
|
||||
EXPECT_EQ(CALL_FUNC(printf, "Hello World", (char *)-1), 0);
|
||||
EXPECT_STREQ(dummy_exec_env.get_exception(),
|
||||
"Exception: out of bounds memory access");
|
||||
dummy_exec_env.clear_exception();
|
||||
@ -324,7 +324,7 @@ TEST_F(LibcBuiltinTest, printf)
|
||||
TEST_F(LibcBuiltinTest, sprintf)
|
||||
{
|
||||
char buf[200] = {0};
|
||||
const char *str = "Hello Wrold";
|
||||
const char *str = "Hello World";
|
||||
const char *str_sig = "c";
|
||||
const char *str_f = "20, 3.140000, Hello World";
|
||||
const char *str_long = "eqwewerwerqwer34were"; // test ok
|
||||
@ -399,19 +399,19 @@ TEST_F(LibcBuiltinTest, snprintf)
|
||||
|
||||
WAMRVaList empty_va_list(dummy_exec_env.get());
|
||||
|
||||
EXPECT_EQ(CALL_FUNC(snprintf, buf, strlen("Hello Wrold"), "Hello Wrold", 0),
|
||||
EXPECT_EQ(CALL_FUNC(snprintf, buf, strlen("Hello World"), "Hello World", 0),
|
||||
0);
|
||||
EXPECT_EQ(
|
||||
CALL_FUNC(snprintf, buf, strlen("Hello Wrold"), "Hello Wrold", NULL),
|
||||
CALL_FUNC(snprintf, buf, strlen("Hello World"), "Hello World", NULL),
|
||||
0);
|
||||
EXPECT_EQ(CALL_FUNC(snprintf, buf, strlen("Hello Wrold"), "Hello Wrold",
|
||||
EXPECT_EQ(CALL_FUNC(snprintf, buf, strlen("Hello World"), "Hello World",
|
||||
(char *)-1),
|
||||
0);
|
||||
|
||||
EXPECT_EQ(CALL_FUNC(snprintf, buf, strlen("Hello Wrold"), "Hello Wrold",
|
||||
EXPECT_EQ(CALL_FUNC(snprintf, buf, strlen("Hello World"), "Hello World",
|
||||
empty_va_list.get()),
|
||||
strlen("Hello Wrold"));
|
||||
EXPECT_EQ(CALL_FUNC(memcmp, buf, "Hello Wrold", strlen("Hello Wrold")), 0);
|
||||
strlen("Hello World"));
|
||||
EXPECT_EQ(CALL_FUNC(memcmp, buf, "Hello World", strlen("Hello World")), 0);
|
||||
|
||||
EXPECT_EQ(CALL_FUNC(snprintf, buf, strlen(very_long_string),
|
||||
very_long_string, empty_va_list.get()),
|
||||
|
||||
@ -41,7 +41,7 @@ class TEST_SUITE_NAME : public testing::Test
|
||||
// accessed from sub-classes.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
virtual void SetUp() {}
|
||||
|
||||
|
||||
@ -41,7 +41,7 @@ class TEST_SUITE_NAME : public testing::Test
|
||||
// accessed from sub-classes.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
virtual void SetUp() {}
|
||||
|
||||
|
||||
@ -73,7 +73,7 @@ class memory64_test_suite : public testing::TestWithParam<RunningMode>
|
||||
// TEST_P.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
virtual void SetUp()
|
||||
{
|
||||
|
||||
@ -193,7 +193,7 @@ class wasm_running_modes_test_suite : public testing::TestWithParam<RunningMode>
|
||||
// TEST_P.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
virtual void SetUp()
|
||||
{
|
||||
|
||||
@ -15,7 +15,7 @@ class wasm_exec_env_test_suite : public testing::Test
|
||||
// accessed from sub-classes.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
virtual void SetUp() {}
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@ class wasm_runtime_common_test_suite : public testing::Test
|
||||
// accessed from sub-classes.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
virtual void SetUp() {}
|
||||
|
||||
|
||||
@ -72,7 +72,7 @@ class wasm_runtime_init_test_suite : public testing::Test
|
||||
// accessed from sub-classes.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
virtual void SetUp() {}
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ class bh_assert_test_suite : public testing::Test
|
||||
// accessed from sub-classes.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
virtual void SetUp() {}
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ class bh_common_test_suite : public testing::Test
|
||||
// accessed from sub-classes.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
virtual void SetUp() {}
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ class bh_hashmap_test_suite : public testing::Test
|
||||
// accessed from sub-classes.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
virtual void SetUp() {}
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ class bh_list_test_suite : public testing::Test
|
||||
// accessed from sub-classes.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
virtual void SetUp() {}
|
||||
|
||||
@ -70,7 +70,7 @@ TEST_F(bh_list_test_suite, bh_list_remove)
|
||||
bh_list_insert(&list_test, &elem_insert_4);
|
||||
EXPECT_EQ(BH_LIST_SUCCESS, bh_list_remove(&list_test, &elem_insert_1));
|
||||
|
||||
// The elem specified by prameter is not in the list.
|
||||
// The elem specified by parameter is not in the list.
|
||||
EXPECT_EQ(BH_LIST_ERROR, bh_list_remove(&list_test, &elem_insert_1));
|
||||
|
||||
// Illegal parameters.
|
||||
|
||||
@ -16,7 +16,7 @@ class bh_log_test_suite : public testing::Test
|
||||
// accessed from sub-classes.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
virtual void SetUp() {}
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ class bh_queue_test_suite : public testing::Test
|
||||
// accessed from sub-classes.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
virtual void SetUp() {}
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ class bh_vector_test_suite : public testing::Test
|
||||
// accessed from sub-classes.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
virtual void SetUp() {}
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ class SharedUtilsTest : public testing::Test
|
||||
// accessed from sub-classes.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
virtual void SetUp() {}
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ class WasmVMTest : public testing::Test
|
||||
// accessed from sub-classes.
|
||||
|
||||
// virtual void SetUp() will be called before each test is run. You
|
||||
// should define it if you need to initialize the varaibles.
|
||||
// should define it if you need to initialize the variables.
|
||||
// Otherwise, this can be skipped.
|
||||
void SetUp()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user