Skip to content

Commit

Permalink
[2_1] Cork: tm_encode
Browse files Browse the repository at this point in the history
  • Loading branch information
da-liii committed Jun 18, 2024
1 parent 7f1e380 commit 4249b13
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/Data/String/cork_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

/******************************************************************************
* MODULE : cork_test.cpp
* DESCRIPTION: tests for the Cork encoding
* COPYRIGHT : (C) 2024 Darcy Shen
*******************************************************************************
* This software falls under the GNU general public license version 3 or later.
* It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
* in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
******************************************************************************/

#include "modification.hpp"
#include "moe_doctests.hpp"
#include "tree.hpp"

TEST_CASE ("tm_encode") {
string_eq (tm_encode ("<>"), "<less><gtr>");
string_eq (tm_encode ("<#ABCD>"), "<less>#ABCD<gtr>");
string_eq (tm_encode ("abc", "abc"));
string_eq (tm_encode ("", ""));
}

0 comments on commit 4249b13

Please sign in to comment.