Files
GDevelop/Core/tests/SceneNameMangler.cpp
T
Florian Rival a8559bfbbc Add clang-format to format (C++) source files automatically (#491)
* Update all CMakeLists of extensions to use clang-format
* Run clang-format on all Extensions
* Update GDCore CMakeLists.txt to add clang-format
* Run clang-format on GDCore files
* Update GDJS and GDCpp CMakeLists.txt to add clang-format
* Run clang-format on GDCpp and GDJS files
2018-05-09 15:57:38 -07:00

27 lines
1000 B
C++

/*
* GDevelop Core
* Copyright 2008-2016 Florian Rival (Florian.Rival@gmail.com). All rights
* reserved. This project is released under the MIT License.
*/
/**
* @file Tests covering common features of GDevelop Core.
*/
#include "GDCore/IDE/SceneNameMangler.h"
#include "catch.hpp"
TEST_CASE("SceneNameMangler", "[common]") {
SECTION("Basics") {
REQUIRE(gd::SceneNameMangler::GetMangledSceneName(
u8"TotallyCorrectSceneName") == u8"TotallyCorrectSceneName");
REQUIRE(gd::SceneNameMangler::GetMangledSceneName(
u8"Totally NOT CorrectSceneName") ==
u8"Totally_32NOT_32CorrectSceneName");
REQUIRE(gd::SceneNameMangler::GetMangledSceneName(u8"Nouvelle scène") ==
u8"Nouvelle_32sc_232ne");
REQUIRE(gd::SceneNameMangler::GetMangledSceneName(u8"A test Ԙ") ==
u8"A_32test_32_1304");
REQUIRE(gd::SceneNameMangler::GetMangledSceneName(u8"1 Nouvelle scène") ==
u8"_49_32Nouvelle_32sc_232ne");
}
}