Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbf77b48

Browse files
committed
Adding test code for String::toLowerCase/toUpperCase
1 parentcbec108 commitbf77b48

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed

‎test/CMakeLists.txt‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ set(TEST_SRCS
4545
src/String/test_concat.cpp
4646
src/String/test_length.cpp
4747
src/String/test_String.cpp
48+
src/String/test_toLowerCase.cpp
49+
src/String/test_toUpperCase.cpp
4850
src/WCharacter/test_isControl.cpp
4951
src/WCharacter/test_isDigit.cpp
5052
src/WCharacter/test_isHexadecimalDigit.cpp
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright (c) 2020 Arduino. All rights reserved.
3+
*/
4+
5+
/**************************************************************************************
6+
* INCLUDE
7+
**************************************************************************************/
8+
9+
#include<catch.hpp>
10+
11+
#include<String.h>
12+
13+
/**************************************************************************************
14+
* TEST CODE
15+
**************************************************************************************/
16+
17+
TEST_CASE ("Testing String::toLowerCase","[String-toLowerCase-01]")
18+
{
19+
arduino::Stringstr("HELLO ARDUINO");
20+
str.toLowerCase();
21+
REQUIRE(strcmp(str.c_str(),"hello arduino") ==0);
22+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright (c) 2020 Arduino. All rights reserved.
3+
*/
4+
5+
/**************************************************************************************
6+
* INCLUDE
7+
**************************************************************************************/
8+
9+
#include<catch.hpp>
10+
11+
#include<String.h>
12+
13+
/**************************************************************************************
14+
* TEST CODE
15+
**************************************************************************************/
16+
17+
TEST_CASE ("Testing String::toUpperCase","[String-toUpperCase-01]")
18+
{
19+
arduino::Stringstr("hello arduino");
20+
str.toUpperCase();
21+
REQUIRE(strcmp(str.c_str(),"HELLO ARDUINO") ==0);
22+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp