Skip to content

Commit 3492f7b

Browse files
committed
testing bounded_linear, R, S..
1 parent b2aed6e commit 3492f7b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test_fuzzy_units.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,14 @@ def test_R(self, x, left, right):
8383
def test_S(self, x, left, right):
8484
assume(left < right)
8585
f = fun.S(left, right)
86+
assert (0 <= f(x) <= 1)
87+
88+
@given(st.floats(allow_nan=False),
89+
st.floats(allow_nan=False, allow_infinity=False),
90+
st.floats(allow_nan=False, allow_infinity=False),
91+
st.floats(min_value=0, max_value=1),
92+
st.floats(min_value=0, max_value=1))
93+
def test_rectangular(self, x, low_bound, high_bound, core_m, unsupported_m):
94+
assume(left < right)
95+
f = fun.rectangular(low_bound, high_bound, core_m, unsupported_m)
8696
assert (0 <= f(x) <= 1)

0 commit comments

Comments
 (0)