#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# @test
# @bug 4989093 5009164 5023880 5029482 6206786
# @run shell ../verifyVariables.sh
# @run shell scanner.sh
# @summary Test source order scanner
# @author Joseph D. Darcy
case "${OS}" in
SEP=";"
;;
* )
SEP=":"
;;
esac
# Construct path to apt executable
printf "%s\n" "APT = ${APT}"
# Construct path to javac executable
JAVAC="${TESTJAVA}/bin/javac ${TESTTOOLVMOPTS} -source 1.5 -sourcepath ${TESTSRC} -classpath ${TESTJAVA}/lib/tools.jar -d . "
${JAVAC} ${TESTSRC}/Scanner.java ${TESTSRC}/VisitOrder.java ${TESTSRC}/Counter.java ${TESTSRC}/MemberOrderApf.java
RESULT=$?
case "${RESULT}" in
0 )
;;
* )
echo "Compilation failed."
exit 1
esac
echo "Making services directory and copying services information."
# Jar files created; verify options properly present on both initial
# and recursive apt runs
#---------------------------------------------------------
unset CLASSPATH
RESULT=$?
case "${RESULT}" in
0 )
;;
* )
echo "Program elements visited in wrong order"
exit 1
;;
esac
#---------------------------------------------------------
# Verify that plain decl' scanner and source order decl' scanner
# record the same number of elements for an enum
RESULT=$?
case "${RESULT}" in
0 )
;;
* )
echo "Improper counts"
exit 1
;;
esac
#---------------------------------------------------------
# Verify that members happen to be returned in source order
RESULT=$?
case "${RESULT}" in
0 )
;;
* )
echo "Improper counts"
exit 1
;;
esac
exit 0;