File indexing completed on 2024-12-22 04:09:28
0001 /* 0002 * SPDX-FileCopyrightText: 2022 Dmitry Kazakov <dimula73@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "KisLazyStorageTest.h" 0008 0009 #include "simpletest.h" 0010 0011 #include "KisLazyStorage.h" 0012 0013 void KisLazyStorageTest::test() 0014 { 0015 KisLazyStorage<int, int> storage1(42); 0016 QCOMPARE(*storage1, 42); 0017 0018 KisLazyStorage<QPair<int, float>, int, float> storage2(13, 42.0f); 0019 QCOMPARE(*storage2, qMakePair(13, 42.0f)); 0020 0021 KisLazyStorage<float, float> storage3(KisLazyStorage<float, float>::init_value_tag(), 0022 42.0f); 0023 QCOMPARE(*storage3, 42.0f); 0024 0025 } 0026 0027 SIMPLE_TEST_MAIN(KisLazyStorageTest);