diff options
author | Jelle Raaijmakers <jelle@gmta.nl> | 2021-04-08 18:50:25 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-08 20:30:56 +0200 |
commit | 4bfd394384f06a791dd1221841d7c404e27aac62 (patch) | |
tree | 2a892bded128d4e7dda9fd09f5bee597d5d06e76 /Userland/Tests | |
parent | 18b333473804756214509e4d5143415a7f3332ee (diff) | |
download | serenity-4bfd394384f06a791dd1221841d7c404e27aac62.zip |
Tests: Merge duplicate TestFormat test into AK directory
Diffstat (limited to 'Userland/Tests')
-rw-r--r-- | Userland/Tests/AK/CMakeLists.txt | 9 | ||||
-rw-r--r-- | Userland/Tests/AK/TestFormat.cpp | 40 | ||||
-rw-r--r-- | Userland/Tests/CMakeLists.txt | 1 |
3 files changed, 0 insertions, 50 deletions
diff --git a/Userland/Tests/AK/CMakeLists.txt b/Userland/Tests/AK/CMakeLists.txt deleted file mode 100644 index 7a36b93ceb..0000000000 --- a/Userland/Tests/AK/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -file(GLOB CMD_SOURCES CONFIGURE_DEPENDS "*.cpp") - -foreach(CMD_SRC ${CMD_SOURCES}) - get_filename_component(CMD_NAME ${CMD_SRC} NAME_WE) - add_executable(${CMD_NAME}_Userland ${CMD_SRC}) - set_target_properties(${CMD_NAME}_Userland PROPERTIES OUTPUT_NAME ${CMD_NAME}) - target_link_libraries(${CMD_NAME}_Userland LibCore) - install(TARGETS ${CMD_NAME}_Userland RUNTIME DESTINATION usr/Tests/AK) -endforeach() diff --git a/Userland/Tests/AK/TestFormat.cpp b/Userland/Tests/AK/TestFormat.cpp deleted file mode 100644 index bf15e8cef3..0000000000 --- a/Userland/Tests/AK/TestFormat.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2021, the SerenityOS developers. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include <AK/TestSuite.h> - -TEST_CASE(long_long_regression) -{ - EXPECT_EQ(String::formatted("{}", 0x0123456789abcdefLL), "81985529216486895"); - - StringBuilder builder; - AK::FormatBuilder fmtbuilder { builder }; - fmtbuilder.put_i64(0x0123456789abcdefLL); - - EXPECT_EQ(builder.string_view(), "81985529216486895"); -} - -TEST_MAIN(Format) diff --git a/Userland/Tests/CMakeLists.txt b/Userland/Tests/CMakeLists.txt index f39cf9b527..c16c400cdd 100644 --- a/Userland/Tests/CMakeLists.txt +++ b/Userland/Tests/CMakeLists.txt @@ -1,4 +1,3 @@ -add_subdirectory(AK) add_subdirectory(Kernel) add_subdirectory(LibC) add_subdirectory(LibGfx) |