Commit 16e33ef6 authored by Adam P. Goucher's avatar Adam P. Goucher

Fixed bug noticed by Jeremy Tan

parent fcf0f0f7
Pipeline #55735327 passed with stages
in 8 minutes and 45 seconds
#ifndef LIFELIB_VERSION /*
__version__=[x.replace('"', '') for x in '''
*/
#define LIFELIB_VERSION "ll2.2.9"
#define LIFELIB_VERSION "ll2.2.10"
// '''.split() if ('ll' in x)][0][2:]
#endif
......@@ -501,7 +501,7 @@ namespace apg {
}
hypernode<I> pattern_match(hypernode<I> u, hypernode<I> c0, hypernode<I> c1) {
hypernode<I> v = pyramid_up(pyramid_up(pyramid_up(u, c0.depth), c1.depth));
hypernode<I> v = pyramid_up(pyramid_up(pyramid_up(pyramid_up(u, c0.depth), c1.depth)));
hypernode<I> sol = solid(v.depth);
hypernode<I> sol2 = solid(v.depth-1);
hypernode<I> rc0 = pyramid_up(transform_recurse(c0, 27), v.depth);
......
......@@ -20,6 +20,14 @@ class TestGoL(unittest.TestCase):
self.sess.lifelib.ensure_limit(20000, 1)
self.sess.lifelib.ensure_limit(10000, 1)
def test_freywa_bug(self):
a = self.lt.pattern("bo$2bo$3o5$5bobo$6b2o$6bo")
b = self.lt.pattern("bo$2bo$3o")
self.assertEqual(a(-10, -16).match(b).nonempty(), True)
self.assertEqual(a(-20, -32).match(b).nonempty(), True)
self.assertEqual(a(-40, -64).match(b).nonempty(), True)
def test_components(self):
pat = self.lt.pattern('''7b3o5b3o16b3o5b3o$6bo2bo5bo2bo15bo2bo3bo2bo$6bo3bo3bo3bo15bo9bo$7b4o3b
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment