forked from arduino/ArduinoCore-API
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_isEmpty.cpp
More file actions
31 lines (24 loc) · 894 Bytes
/
test_isEmpty.cpp
File metadata and controls
31 lines (24 loc) · 894 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
* Copyright (c) 2023 Arduino. All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
/**************************************************************************************
* INCLUDE
**************************************************************************************/
#include <catch2/catch_test_macros.hpp>
#include <api/String.h>
#include "StringPrinter.h"
/**************************************************************************************
* TEST CODE
**************************************************************************************/
TEST_CASE ("Testing String::isEmpty when string is empty", "[String-isEmpty-01]")
{
arduino::String str;
REQUIRE(str.isEmpty());
}
TEST_CASE ("Testing String::isEmpty when string contains characters", "[String-isEmpty-02]")
{
arduino::String str("Testing String::isEmpty");
REQUIRE(!str.isEmpty());
}