Skip to content

Commit

Permalink
using frequency 0 in place of explicit negation in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maxeeem committed May 1, 2024
1 parent b648ba2 commit ba1780b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
16 changes: 8 additions & 8 deletions Tests/test_NAL/test_NAL3.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def test_compound_decomposition_intensional_intersection(self):
'''
tasks_derived = process_two_premises(
'<robin --> (|,bird,swimmer)>. %1.00;0.90%',
'(--, <robin --> swimmer>). %1.00;0.90%',
'<robin --> swimmer>. %0.00;0.90%',
20
)
self.assertTrue(
Expand All @@ -160,7 +160,7 @@ def test_compound_decomposition_intensional_intersection(self):
nars.reset()

tasks_derived = process_two_premises(
'(--, <robin --> swimmer>). %1.00;0.90%',
'<robin --> swimmer>. %0.00;0.90%',
'<robin --> (|,bird,swimmer)>. %1.00;0.90%',
20
)
Expand All @@ -186,23 +186,23 @@ def test_compound_decomposition_extensional_difference(self):
''outputMustContain('<robin --> mammal>. %0.00;0.81%')
'''
tasks_derived = process_two_premises(
'(--, <robin --> swimmer>). %1.00;0.90%',
'(--, <robin --> (-,mammal,swimmer)>). %1.00;0.90%',
'<robin --> swimmer>. %0.00;0.90%',
'<robin --> (-,mammal,swimmer)>. %0.00;0.90%',
32
)
self.assertTrue(
output_contains(tasks_derived, '(--, <robin --> mammal>). %1.00;0.81%')
output_contains(tasks_derived, '<robin --> mammal>. %0.00;0.81%')
)

nars.reset()

tasks_derived = process_two_premises(
'(--, <robin --> (-,mammal,swimmer)>). %1.00;0.90%',
'(--, <robin --> swimmer>). %1.00;0.90%',
'<robin --> (-,mammal,swimmer)>. %0.00;0.90%',
'<robin --> swimmer>. %0.00;0.90%',
32
)
self.assertTrue(
output_contains(tasks_derived, '(--, <robin --> mammal>). %1.00;0.81%')
output_contains(tasks_derived, '<robin --> mammal>. %0.00;0.81%')
)

pass
Expand Down
20 changes: 10 additions & 10 deletions Tests/test_NAL/test_NAL5.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,12 +557,12 @@ def test_decomposition_0(self):
''outputMustContain('<<robin --> bird> ==> <robin --> animal>>. %0.00;0.81%')
'''
tasks_derived = process_two_premises(
'(--, <<robin --> bird> ==> (&&,<robin --> animal>,<robin --> [flying]>)>). %1.00;0.90%',
'<<robin --> bird> ==> (&&,<robin --> animal>,<robin --> [flying]>)>. %0.00;0.90%',
'<<robin --> bird> ==> <robin --> [flying]>>. %1.00;0.90%',
10
200
)
self.assertTrue(
output_contains(tasks_derived, '(--, <<robin --> bird> ==> <robin --> animal>>). %1.00;0.81%')
output_contains(tasks_derived, '<<robin --> bird> ==> <robin --> animal>>. %0.00;0.81%')
)
pass

Expand All @@ -583,23 +583,23 @@ def test_decomposition_1(self):
''outputMustContain('<robin --> swimmer>. %0.00;0.81%')
'''
tasks_derived = process_two_premises(
'(--, (&&,<robin --> [flying]>,<robin --> swimmer>)). %1.00;0.90% ',
'(&&,<robin --> [flying]>,<robin --> swimmer>). %0.00;0.90% ',
'<robin --> [flying]>. %1.00;0.90%',
20
100
)
self.assertTrue(
output_contains(tasks_derived, '(--, <robin --> swimmer>). %1.00;0.81%')
output_contains(tasks_derived, '<robin --> swimmer>. %0.00;0.81%')
)

nars.reset()

tasks_derived = process_two_premises(
'<robin --> [flying]>. %1.00;0.90%',
'(--, (&&,<robin --> [flying]>,<robin --> swimmer>)). %1.00;0.90% ',
20
'(&&,<robin --> [flying]>,<robin --> swimmer>). %0.00;0.90% ',
100
)
self.assertTrue(
output_contains(tasks_derived, '(--, <robin --> swimmer>). %1.00;0.81%')
output_contains(tasks_derived, '<robin --> swimmer>. %0.00;0.81%')
)

pass
Expand All @@ -622,7 +622,7 @@ def test_decomposition_2(self):
'''
tasks_derived = process_two_premises(
'(||,<robin --> [flying]>,<robin --> swimmer>). %1.00;0.90% ',
'(--, <robin --> swimmer>). %1.00;0.90%',
'<robin --> swimmer>. %0.00;0.90%',
50
)
self.assertTrue(
Expand Down

0 comments on commit ba1780b

Please sign in to comment.