From ff2b708f8cb716a179f2de534c1694fce9434243 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 25 Mar 2015 13:49:14 +0100 Subject: IncludeAbsoluteTest: Fix test on Windows: Use slashified absolut pathname as required by Preprocessor --- src/test/java/com/jogamp/gluegen/jcpp/IncludeAbsoluteTest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/test/java/com/jogamp/gluegen/jcpp/IncludeAbsoluteTest.java b/src/test/java/com/jogamp/gluegen/jcpp/IncludeAbsoluteTest.java index e9d7b27..9008ebe 100644 --- a/src/test/java/com/jogamp/gluegen/jcpp/IncludeAbsoluteTest.java +++ b/src/test/java/com/jogamp/gluegen/jcpp/IncludeAbsoluteTest.java @@ -32,8 +32,13 @@ public class IncludeAbsoluteTest extends SingletonJunitCase { final File file = new File(filepath); assertTrue(file.exists()); + final String slashifiedFilePath = IOUtil.slashify(file.getAbsolutePath(), true, false); + LOG.info("slashifiedFilePath: " + slashifiedFilePath); - final String input = "#include <" + file.getAbsolutePath() + ">\n"; + // Expects something like: + // WINDOWS: "/C:/projects/jogamp/gluegen/jcpp/src/test/resources/absolute.h" + // UNIX: "/projects/jogamp/gluegen/jcpp/src/test/resources/absolute.h" + final String input = "#include <" + slashifiedFilePath + ">\n"; LOG.info("Input: " + input); final Preprocessor pp = new Preprocessor(); pp.addInput(new StringLexerSource(input, true)); -- cgit v1.2.3