NFC: Clean up constant fold tests
NFC: Clean up constant fold tests

Use variable captures to make constant folding tests less sensitive to printer/parser implementation details.

See guidelines at https://github.com/tensorflow/mlir/blob/master/g3doc/TestingGuide.md

PiperOrigin-RevId: 268780812

jhseu/tensorflow,tensorflow/tensorflow,adit-chandra/tensorflow,jhseu/tensorflow,aam-at/tensorflow,Intel-tensorflow/tensorflow,gunan/tensorflow,gautam1858/tensorflow,cxxgtxy/tensorflow,davidzchen/tensorflow,Intel-tensorflow/tensorflow,Intel-tensorflow/tensorflow,petewarden/tensorflow,Intel-tensorflow/tensorflow,paolodedios/tensorflow,paolodedios/tensorflow,freedomtan/tensorflow,Intel-tensorflow/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,jhseu/tensorflow,frreiss/tensorflow-fred,arborh/tensorflow,DavidNorman/tensorflow,frreiss/tensorflow-fred,gautam1858/tensorflow,aam-at/tensorflow,aam-at/tensorflow,arborh/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,sarvex/tensorflow,cxxgtxy/tensorflow,frreiss/tensorflow-fred,freedomtan/tensorflow,aldian/tensorflow,sarvex/tensorflow,gautam1858/tensorflow,Intel-Corporation/tensorflow,annarev/tensorflow,annarev/tensorflow,cxxgtxy/tensorflow,freedomtan/tensorflow,renyi533/tensorflow,karllessard/tensorflow,freedomtan/tensorflow,jhseu/tensorflow,aam-at/tensorflow,jhseu/tensorflow,cxxgtxy/tensorflow,gunan/tensorflow,frreiss/tensorflow-fred,renyi533/tensorflow,frreiss/tensorflow-fred,aam-at/tensorflow,petewarden/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,aldian/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow,xzturn/tensorflow,tensorflow/tensorflow,karllessard/tensorflow,davidzchen/tensorflow,freedomtan/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow,jhseu/tensorflow,karllessard/tensorflow,petewarden/tensorflow,jhseu/tensorflow,tensorflow/tensorflow-pywrap_saved_model,gunan/tensorflow,paolodedios/tensorflow,frreiss/tensorflow-fred,annarev/tensorflow,aam-at/tensorflow,davidzchen/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-pywrap_saved_model,adit-chandra/tensorflow,renyi533/tensorflow,yongtang/tensorflow,davidzchen/tensorflow,davidzchen/tensorflow,DavidNorman/tensorflow,xzturn/tensorflow,ppwwyyxx/tensorflow,xzturn/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-experimental_link_static_libraries_once,annarev/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,renyi533/tensorflow,ppwwyyxx/tensorflow,karllessard/tensorflow,arborh/tensorflow,tensorflow/tensorflow,arborh/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,renyi533/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,arborh/tensorflow,Intel-tensorflow/tensorflow,yongtang/tensorflow,Intel-tensorflow/tensorflow,DavidNorman/tensorflow,gautam1858/tensorflow,arborh/tensorflow,paolodedios/tensorflow,cxxgtxy/tensorflow,sarvex/tensorflow,adit-chandra/tensorflow,jhseu/tensorflow,annarev/tensorflow,paolodedios/tensorflow,DavidNorman/tensorflow,aldian/tensorflow,adit-chandra/tensorflow,ppwwyyxx/tensorflow,adit-chandra/tensorflow,xzturn/tensorflow,frreiss/tensorflow-fred,gautam1858/tensorflow,gautam1858/tensorflow,adit-chandra/tensorflow,DavidNorman/tensorflow,ppwwyyxx/tensorflow,ppwwyyxx/tensorflow,paolodedios/tensorflow,ppwwyyxx/tensorflow,Intel-Corporation/tensorflow,gautam1858/tensorflow,renyi533/tensorflow,jhseu/tensorflow,renyi533/tensorflow,petewarden/tensorflow,Intel-Corporation/tensorflow,yongtang/tensorflow,DavidNorman/tensorflow,annarev/tensorflow,adit-chandra/tensorflow,frreiss/tensorflow-fred,arborh/tensorflow,arborh/tensorflow,tensorflow/tensorflow,gunan/tensorflow,yongtang/tensorflow,adit-chandra/tensorflow,sarvex/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,DavidNorman/tensorflow,freedomtan/tensorflow,Intel-Corporation/tensorflow,annarev/tensorflow,adit-chandra/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-pywrap_saved_model,freedomtan/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,tensorflow/tensorflow,gunan/tensorflow,gunan/tensorflow,cxxgtxy/tensorflow,sarvex/tensorflow,DavidNorman/tensorflow,aldian/tensorflow,gunan/tensorflow,petewarden/tensorflow,yongtang/tensorflow,petewarden/tensorflow,annarev/tensorflow,freedomtan/tensorflow,Intel-Corporation/tensorflow,xzturn/tensorflow,xzturn/tensorflow,renyi533/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gautam1858/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_saved_model,freedomtan/tensorflow,davidzchen/tensorflow,yongtang/tensorflow,gunan/tensorflow,aam-at/tensorflow,paolodedios/tensorflow,karllessard/tensorflow,Intel-tensorflow/tensorflow,frreiss/tensorflow-fred,petewarden/tensorflow,davidzchen/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,xzturn/tensorflow,davidzchen/tensorflow,yongtang/tensorflow,annarev/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,xzturn/tensorflow,adit-chandra/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow,DavidNorman/tensorflow,gunan/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_saved_model,aldian/tensorflow,renyi533/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,yongtang/tensorflow,Intel-Corporation/tensorflow,petewarden/tensorflow,jhseu/tensorflow,karllessard/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,davidzchen/tensorflow,petewarden/tensorflow,freedomtan/tensorflow,davidzchen/tensorflow,DavidNorman/tensorflow,gunan/tensorflow,annarev/tensorflow,Intel-Corporation/tensorflow,adit-chandra/tensorflow,paolodedios/tensorflow,yongtang/tensorflow,xzturn/tensorflow,tensorflow/tensorflow-pywrap_saved_model,gunan/tensorflow,ppwwyyxx/tensorflow,xzturn/tensorflow,DavidNorman/tensorflow,paolodedios/tensorflow,renyi533/tensorflow,renyi533/tensorflow,arborh/tensorflow,arborh/tensorflow,aam-at/tensorflow,karllessard/tensorflow,aam-at/tensorflow,renyi533/tensorflow,Intel-Corporation/tensorflow,aldian/tensorflow,yongtang/tensorflow,gautam1858/tensorflow,frreiss/tensorflow-fred,aldian/tensorflow,tensorflow/tensorflow-pywrap_saved_model,arborh/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,annarev/tensorflow,ppwwyyxx/tensorflow,jhseu/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,freedomtan/tensorflow,ppwwyyxx/tensorflow,petewarden/tensorflow,sarvex/tensorflow,xzturn/tensorflow,gautam1858/tensorflow,aldian/tensorflow,Intel-tensorflow/tensorflow,xzturn/tensorflow,sarvex/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,freedomtan/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow-pywrap_saved_model,ppwwyyxx/tensorflow,karllessard/tensorflow,frreiss/tensorflow-fred,gunan/tensorflow,jhseu/tensorflow,petewarden/tensorflow,ppwwyyxx/tensorflow,gautam1858/tensorflow,davidzchen/tensorflow,arborh/tensorflow,frreiss/tensorflow-fred,cxxgtxy/tensorflow,sarvex/tensorflow,Intel-tensorflow/tensorflow