-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#330] Introduce new set_cpp_allocator command line option
- Loading branch information
Showing
20 changed files
with
121 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<project name="cpp_error" basedir="." default="run"> | ||
<testProperties testPath="errors/cpp_error" testName="cpp_error"/> | ||
|
||
<target name="prepare"> | ||
<testPrepare testName="cpp_error"/> | ||
</target> | ||
|
||
<target name="gen.check" depends="prepare"> | ||
<testGenCheck testName="cpp_error"/> | ||
</target> | ||
|
||
<target name="gen" depends="gen.check" unless="cpp_error.zs.gen_is_uptodate"> | ||
<testGenClean testName="cpp_error"/> | ||
<testGen testName="cpp_error" zsFile="wrong_set_cpp_allocator_error.zs" ignoreErrors="true"> | ||
<arg name="setCppAllocator" value="wrong"/> | ||
</testGen> | ||
</target> | ||
|
||
<target name="compile" depends="gen"> | ||
<testCompile testName="cpp_error" srcPath="${cpp_error.base_dir}/java"/> | ||
</target> | ||
|
||
<target name="spotbugs" depends="compile" if="spotbugs.home_dir"> | ||
<testSpotBugs testName="cpp_error" srcPath="${cpp_error.base_dir}/java"/> | ||
</target> | ||
|
||
<target name="run" depends="spotbugs"> | ||
<testRun testName="cpp_error"/> | ||
</target> | ||
|
||
<target name="clean"> | ||
<testClean testName="cpp_error"/> | ||
</target> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package cpp_error; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
import org.junit.BeforeClass; | ||
import org.junit.Test; | ||
|
||
import java.io.IOException; | ||
|
||
import test_utils.ZserioErrors; | ||
|
||
public class CppErrorTest | ||
{ | ||
@BeforeClass | ||
public static void readZserioErrors() throws IOException | ||
{ | ||
zserioErrors = new ZserioErrors(); | ||
} | ||
|
||
@Test | ||
public void wrongSetCppAllocator() | ||
{ | ||
final String error = "[ERROR] C++11 Generator: The specified option 'setCppAllocator' has unknown " + | ||
"allocator 'wrong'!"; | ||
assertTrue(zserioErrors.isPresent(error)); | ||
} | ||
|
||
private static ZserioErrors zserioErrors; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package wrong_set_cpp_allocator_error; |