]> git.pld-linux.org Git - packages/rapidcheck.git/blob - rapidcheck.spec
- new; built with Catch2 and gtest/gmock support
[packages/rapidcheck.git] / rapidcheck.spec
1 Summary:        RapidCheck - C++ framework for property based testing
2 Summary(pl.UTF-8):      RapidCheck - szkielet C++ do testowania opartego na własnościach
3 Name:           rapidcheck
4 Version:        0
5 %define gitref  1505cbbce733bde3b78042cf2e9309c0b7f227a2
6 %define snap    20230114
7 %define rel     1
8 Release:        0.%{snap}.%{rel}
9 License:        BSD
10 Group:          Libraries
11 Source0:        https://github.com/emil-e/rapidcheck/archive/%{gitref}/%{name}-%{snap}.tar.gz
12 # Source0-md5:  be5af76d09734665f2e1962539f23a58
13 # 03d122a is v2.4.2 tag
14 %define catch_ver       2.4.2
15 Source1:        https://github.com/catchorg/Catch2/archive/v%{catch_ver}/Catch2-%{catch_ver}.tar.gz
16 # Source1-md5:  26927b878b1f42633f15a9ef1c4bd8e7
17 %define gtest_gitref    e38ef3be887afc0089005e394c5001002e313960
18 Source2:        https://github.com/google/googletest/archive/%{gtest_gitref}/googletest-%{gtest_gitref}.tar.gz
19 # Source2-md5:  ed4d7fc957e9cdd07af56926676ebd8d
20 URL:            https://github.com/emil-e/rapidcheck
21 BuildRequires:  cmake >= 3.0
22 BuildRequires:  libstdc++-devel >= 6:4.7
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 RapidCheck is a C++ framework for property based testing inspired by
27 QuickCheck and other similar frameworks. In property based testing,
28 you state facts about your code that given certain precondition should
29 always be true. RapidCheck then generates random test data to try and
30 find a case for which the property doesn't hold. If such a case is
31 found, RapidCheck tries to find the smallest case (for some definition
32 of smallest) for which the property is still false and then displays
33 this as a counterexample. For example, if the input is an integer,
34 RapidCheck tries to find the smallest integer for which the property
35 is false.
36
37 %description -l pl.UTF-8
38 RapidCheck to szkielet C++ do testowania opartego na własnościach,
39 zainspirowany przez QuickCheck i podobne szkielety. W testowaniu
40 opartym na własnościach ustala się fakty dotyczące kodu, że konkretne
41 warunki wstępne powinny być prawdziwe. Następnie RapidCheck generuje
42 losowe dane testowe i próbuje znaleźć przypadek, dla którego własność
43 nie jest zachowana. Jeśli to się uda, próbuje znaleźć najmniejszy
44 (zgodnie z pewną definicją) przypadek, dla którego własność jest
45 nadal fałszywa, a następnie wyświetla ten kontrprzykład. Np. jeśli
46 wejście jest liczbą całkowitą, RapidCheck próbuje znaleźć najmniejszą
47 liczbę całkowitą, dla którego własność nie jest spełniona.
48
49 %package devel
50 Summary:        Header files for RapidCheck library
51 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki RapidCheck
52 Group:          Development/Libraries
53 Requires:       %{name} = %{version}-%{release}
54 Requires:       libstdc++-devel >= 6:4.7
55
56 %description devel
57 Header files for RapidCheck library.
58
59 %description devel -l pl.UTF-8
60 Pliki nagłówkowe biblioteki RapidCheck.
61
62 %prep
63 %setup -q -n %{name}-%{gitref}
64
65 tar xf %{SOURCE1} -C ext/catch --strip-components=1
66 tar xf %{SOURCE2} -C ext/googletest --strip-components=1
67
68 %build
69 install -d build
70 cd build
71 %cmake .. \
72         -DRC_ENABLE_CATCH=ON \
73         -DRC_ENABLE_GMOCK=ON \
74         -DRC_ENABLE_GTEST=ON
75
76 %{__make}
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80
81 %{__make} -C build install \
82         DESTDIR=$RPM_BUILD_ROOT
83
84 %clean
85 rm -rf $RPM_BUILD_ROOT
86
87 %post   -p /sbin/ldconfig
88 %postun -p /sbin/ldconfig
89
90 %files
91 %defattr(644,root,root,755)
92 %doc LICENSE.md README.md
93 %attr(755,root,root) %{_libdir}/librapidcheck.so
94
95 %files devel
96 %defattr(644,root,root,755)
97 %doc doc/*.md
98 %{_includedir}/rapidcheck
99 %{_includedir}/rapidcheck.h
100 %dir %{_datadir}/rapidcheck
101 %{_datadir}/rapidcheck/cmake
This page took 0.044096 seconds and 3 git commands to generate.