/
githubmr
/
facebook-react-native
Обзор
Документация
Войти
/
githubmr
/
facebook-react-native
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
main
packages/react-native/ReactCommon/react/renderer/css/tests/CSSNumberLengthTest.cpp
21 строка
663 B
Nick Gerleman
Split value parsing tests (#48770)
18 янв 2025, 02:44
18 янв 2025, 02:44
22e7691
Код
Авторство
О чём код?
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include <gtest/gtest.h> #include <react/renderer/css/CSSLength.h> #include <react/renderer/css/CSSNumber.h> #include <react/renderer/css/CSSValueParser.h> namespace facebook::react { TEST(CSSNumberLength, number_length_values) { auto unitlessZeroValue = parseCSSProperty<CSSNumber, CSSLength>("0"); EXPECT_TRUE(std::holds_alternative<CSSNumber>(unitlessZeroValue)); EXPECT_EQ(std::get<CSSNumber>(unitlessZeroValue).value, 0.0f); } } // namespace facebook::react