# HG changeset patch # User Ed Swartz # Date 1259789003 21600 # Node ID 5d967503c15067a73823f109a8ce787e0a0f4857 # Parent bfb3ab3f70f26c08250f0aa88fa00fcb7f35fb69 Unit test fixes for Win32 diff -r bfb3ab3f70f2 -r 5d967503c150 project/com.nokia.carbide.cpp.epoc.engine.tests/src/com/nokia/carbide/cpp/epoc/engine/tests/model/TestBldInfView.java --- a/project/com.nokia.carbide.cpp.epoc.engine.tests/src/com/nokia/carbide/cpp/epoc/engine/tests/model/TestBldInfView.java Wed Dec 02 15:02:05 2009 -0600 +++ b/project/com.nokia.carbide.cpp.epoc.engine.tests/src/com/nokia/carbide/cpp/epoc/engine/tests/model/TestBldInfView.java Wed Dec 02 15:23:23 2009 -0600 @@ -22,6 +22,7 @@ import com.nokia.carbide.cpp.epoc.engine.preprocessor.DefineFactory; import com.nokia.carbide.cpp.epoc.engine.preprocessor.IDefine; import com.nokia.carbide.internal.api.cpp.epoc.engine.dom.IASTProblemNode; +import com.nokia.cpp.internal.api.utils.core.FileUtils; import com.nokia.cpp.internal.api.utils.core.HostOS; import com.nokia.cpp.internal.api.utils.core.IMessage; @@ -1526,9 +1527,12 @@ "\r\n" + "// End of File\r\n" ; - parserConfig.getFilesystem().put("../MusicPlayer/group/bld.inf", musicPlayerBldInf); - parserConfig.getFilesystem().put("../MusicShop/group/bld.inf", musicShopBldInf); - parserConfig.getFilesystem().put("../MusicVisualization/group/bld.inf", musicVisualizationBldInf); + String musicPlayerBldInfPath = FileUtils.createPossiblyRelativePath("../MusicPlayer/group/bld.inf").toOSString(); + parserConfig.getFilesystem().put(musicPlayerBldInfPath, musicPlayerBldInf); + String musicShopBldInfPath = FileUtils.createPossiblyRelativePath("../MusicShop/group/bld.inf").toOSString(); + parserConfig.getFilesystem().put(musicShopBldInfPath, musicShopBldInf); + String musicVisBldInfPath = FileUtils.createPossiblyRelativePath("../MusicVisualization/group/bld.inf").toOSString(); + parserConfig.getFilesystem().put(musicVisBldInfPath, musicVisualizationBldInf); makeModel(origFile); @@ -1539,10 +1543,10 @@ ref.setPath(new Path("group/FMRadio.mmp")); view.getMakMakeReferences().add(ref); + assertEquals(parserConfig.getFilesystem().get(musicPlayerBldInfPath), musicPlayerBldInf); + assertEquals(parserConfig.getFilesystem().get(musicShopBldInfPath), musicShopBldInf); + assertEquals(parserConfig.getFilesystem().get(musicVisBldInfPath), musicVisualizationBldInf); commitTest(view, updatedFile); - assertEquals(parserConfig.getFilesystem().get("../MusicPlayer/group/bld.inf"), musicPlayerBldInf); - assertEquals(parserConfig.getFilesystem().get("../MusicShop/group/bld.inf"), musicShopBldInf); - assertEquals(parserConfig.getFilesystem().get("../MusicVisualization/group/bld.inf"), musicVisualizationBldInf); } diff -r bfb3ab3f70f2 -r 5d967503c150 project/com.nokia.carbide.cpp.epoc.engine.tests/src/com/nokia/carbide/cpp/epoc/engine/tests/model/TestImageMakefileView.java --- a/project/com.nokia.carbide.cpp.epoc.engine.tests/src/com/nokia/carbide/cpp/epoc/engine/tests/model/TestImageMakefileView.java Wed Dec 02 15:02:05 2009 -0600 +++ b/project/com.nokia.carbide.cpp.epoc.engine.tests/src/com/nokia/carbide/cpp/epoc/engine/tests/model/TestImageMakefileView.java Wed Dec 02 15:23:23 2009 -0600 @@ -976,7 +976,7 @@ IImageSource source = imageMakefileData.getMultiImageSources().get(0).getSources().get(0); // important to be relative IPath relBase; - relBase = stockRootedProjectPath.makeRelative(); + relBase = stockRootedProjectPath.makeRelative().setDevice(null); assertEquals(relBase.append("/gfx/file.svg"), source.getPath()); } diff -r bfb3ab3f70f2 -r 5d967503c150 project/com.nokia.carbide.cpp.epoc.engine.tests/src/com/nokia/carbide/cpp/epoc/engine/tests/model/TestMMPView2.java --- a/project/com.nokia.carbide.cpp.epoc.engine.tests/src/com/nokia/carbide/cpp/epoc/engine/tests/model/TestMMPView2.java Wed Dec 02 15:02:05 2009 -0600 +++ b/project/com.nokia.carbide.cpp.epoc.engine.tests/src/com/nokia/carbide/cpp/epoc/engine/tests/model/TestMMPView2.java Wed Dec 02 15:23:23 2009 -0600 @@ -132,11 +132,11 @@ IMMPView view = model.createView(mmpConfig); IPath[] srcPaths = view.getEffectiveSourcePaths(); // important to be relative - assertEquals(base.makeRelative().append("symbian/9.1/S60_3rd/S60Ex/Hello/src"), srcPaths[0]); + assertEquals(base.makeRelative().setDevice(null).append("symbian/9.1/S60_3rd/S60Ex/Hello/src"), srcPaths[0]); IPath src = view.getSources().get(0); // important to be relative - assertEquals(base.makeRelative().append("symbian/9.1/S60_3rd/S60Ex/Hello/src/foo.cpp"), src); + assertEquals(base.makeRelative().setDevice(null).append("symbian/9.1/S60_3rd/S60Ex/Hello/src/foo.cpp"), src); } } @@ -1214,8 +1214,9 @@ } catch (InvalidDriveInMMPPathException e) { view.getUserIncludes().add(e.getPathNoDevice()); } + IPath fullpath = new Path(getTokenAbsolutePath()).setDevice(null).append("temp"); commitTest(view, - "USERINCLUDE ..\\group \\temp\n"); + "USERINCLUDE ..\\group " + toDosPath(fullpath) + "\n"); } public void testBug2817() {