diff --git a/edu.cuny.hunter.hybridize.tests/resources/HybridizeFunction/testHasLikelyTensorParameter147/in/A.py b/edu.cuny.hunter.hybridize.tests/resources/HybridizeFunction/testHasLikelyTensorParameter147/in/A.py new file mode 100644 index 000000000..b884ea582 --- /dev/null +++ b/edu.cuny.hunter.hybridize.tests/resources/HybridizeFunction/testHasLikelyTensorParameter147/in/A.py @@ -0,0 +1,14 @@ +import tensorflow as tf + + +def add(a, b): + return a + b + + +list = list() + +list.append(tf.ones([1, 2])) +list.append(tf.ones([2, 2])) + +for element in list: + c = add(element, element) diff --git a/edu.cuny.hunter.hybridize.tests/resources/HybridizeFunction/testHasLikelyTensorParameter147/in/requirements.txt b/edu.cuny.hunter.hybridize.tests/resources/HybridizeFunction/testHasLikelyTensorParameter147/in/requirements.txt new file mode 100644 index 000000000..b154f958f --- /dev/null +++ b/edu.cuny.hunter.hybridize.tests/resources/HybridizeFunction/testHasLikelyTensorParameter147/in/requirements.txt @@ -0,0 +1 @@ +tensorflow==2.9.3 diff --git a/edu.cuny.hunter.hybridize.tests/test cases/edu/cuny/hunter/hybridize/tests/HybridizeFunctionRefactoringTest.java b/edu.cuny.hunter.hybridize.tests/test cases/edu/cuny/hunter/hybridize/tests/HybridizeFunctionRefactoringTest.java index 58b62482a..bd3b4e9fa 100644 --- a/edu.cuny.hunter.hybridize.tests/test cases/edu/cuny/hunter/hybridize/tests/HybridizeFunctionRefactoringTest.java +++ b/edu.cuny.hunter.hybridize.tests/test cases/edu/cuny/hunter/hybridize/tests/HybridizeFunctionRefactoringTest.java @@ -4309,6 +4309,14 @@ public void testHasLikelyTensorParameter145() throws Exception { public void testHasLikelyTensorParameter146() throws Exception { testHasLikelyTensorParameterHelper(false, false); } + + /** + * Test for https://github.com/ponder-lab/Hybridize-Functions-Refactoring/issues/265. + */ + @Test + public void testHasLikelyTensorParameter147() throws Exception { + testHasLikelyTensorParameterHelper(false, false); + } // TODO: Test arbitrary expression. // TODO: Test cast/assert statements?