• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kunitoki / popsicle / 8195308623

07 Mar 2024 09:55PM UTC coverage: 20.126% (+1.3%) from 18.801%
8195308623

Pull #24

github

kunitoki
More pixel tests
Pull Request #24: More tests coverage

283 of 398 new or added lines in 6 files covered. (71.11%)

45 existing lines in 5 files now uncovered.

23757 of 118043 relevant lines covered (20.13%)

3617.26 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.0
/modules/juce_python/utilities/PythonTypes.h
1
/**
2
 * juce_python - Python bindings for the JUCE framework.
3
 *
4
 * This file is part of the popsicle project.
5
 *
6
 * Copyright (c) 2024 - kunitoki <kunitoki@gmail.com>
7
 *
8
 * popsicle is an open source library subject to commercial or open-source licensing.
9
 *
10
 * By using popsicle, you agree to the terms of the popsicle License Agreement, which can
11
 * be found at https://raw.githubusercontent.com/kunitoki/popsicle/master/LICENSE
12
 *
13
 * Or: You may also use this code under the terms of the GPL v3 (see www.gnu.org/licenses).
14
 *
15
 * POPSICLE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED
16
 * OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE DISCLAIMED.
17
 */
18

19
#pragma once
20

21
#include <cstdint>
22
#include <functional>
23

24
namespace popsicle {
25

26
// =================================================================================================
27

28
template <class T>
29
class GenericInteger
30
{
31
public:
32
    using underlying_type = T;
33

34
    constexpr GenericInteger() = default;
1✔
35

36
    constexpr GenericInteger (T value) noexcept
12✔
37
        : value (value)
12✔
38
    {
39
    }
12✔
40

41
    constexpr GenericInteger (const GenericInteger& other) = default;
42
    constexpr GenericInteger (GenericInteger&& other) = default;
43
    constexpr GenericInteger& operator= (const GenericInteger& other) = default;
44
    constexpr GenericInteger& operator= (GenericInteger&& other) = default;
45

NEW
46
    constexpr operator T() const noexcept
×
47
    {
NEW
48
        return value;
×
49
    }
50

51
    constexpr T get() const noexcept
12✔
52
    {
53
        return value;
12✔
54
    }
55

56
private:
57
    T value{};
58
};
59

60
// =================================================================================================
61

62
template <class T>
63
struct underlying_type
64
{
65
    using type = T;
66
};
67

68
template <class T>
69
struct underlying_type<GenericInteger<T>>
70
{
71
    using type = typename GenericInteger<T>::underlying_type;
72
};
73

74

75
template <class T>
76
using underlying_type_t = typename underlying_type<T>::type;
77

78
} // namespace popsicle
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc