diff --git a/edu.cuny.hunter.hybridize.tests/resources/HybridizeFunction/testHasLikelyTensorParameter146/in/A.py b/edu.cuny.hunter.hybridize.tests/resources/HybridizeFunction/testHasLikelyTensorParameter146/in/A.py new file mode 100644 index 000000000..33e191933 --- /dev/null +++ b/edu.cuny.hunter.hybridize.tests/resources/HybridizeFunction/testHasLikelyTensorParameter146/in/A.py @@ -0,0 +1,10 @@ +import tensorflow as tf + + +def add(a, b): + return a + b + + +list = [tf.ones([1, 2]), tf.ones([2, 2])] + +c = add(list, list) diff --git a/edu.cuny.hunter.hybridize.tests/resources/HybridizeFunction/testHasLikelyTensorParameter146/in/requirements.txt b/edu.cuny.hunter.hybridize.tests/resources/HybridizeFunction/testHasLikelyTensorParameter146/in/requirements.txt new file mode 100644 index 000000000..b154f958f --- /dev/null +++ b/edu.cuny.hunter.hybridize.tests/resources/HybridizeFunction/testHasLikelyTensorParameter146/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 91658e360..58b62482a 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 @@ -4302,6 +4302,14 @@ public void testHasLikelyTensorParameter145() throws Exception { testHasLikelyTensorParameterHelper(); } + /** + * Test for https://github.com/ponder-lab/Hybridize-Functions-Refactoring/issues/265. + */ + @Test + public void testHasLikelyTensorParameter146() throws Exception { + testHasLikelyTensorParameterHelper(false, false); + } + // TODO: Test arbitrary expression. // TODO: Test cast/assert statements? // TODO: https://www.tensorflow.org/guide/function#pass_tensors_instead_of_python_literals. How do we deal with union types? Do we want