frysk.debuginfo
Class TestObjectDeclarationSearchEngine
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
frysk.junit.TestCase
frysk.testbed.TestLib
frysk.debuginfo.TestObjectDeclarationSearchEngine
- All Implemented Interfaces:
- Test
public class TestObjectDeclarationSearchEngine
- extends TestLib
Tests @link CppVariableSearchEngine.
Each tests is testing the the @link ObjectDeclarationSearchEngine
can find the
correct variable, by insuring that the line number of the found
Variable
is the same as the line number of the variable in the source
file.
To add a new test copy one of the tests here and change the variable name the
variable token if the variable name is not unique, fileName if you do not want
to use funit-c-scopes, and finally exec and src paths of they are something
other than the default.
Methods inherited from class frysk.testbed.TestLib |
addToTearDown, addToTearDown, assertRunToFindProc, assertRunUntilStop, assertRunUntilStop, getExecPath, isChildOf, isChildOfMine, isDescendantOf, isDescendantOfMine, runPending, setUp, tearDown |
Methods inherited from class frysk.junit.TestCase |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, getTimeoutMilliseconds, getTimeoutSeconds, missing32or64, unresolved, unresolvedOffUtrace, unresolvedOn32On64, unresolvedOnIA32, unresolvedOnPPC, unresolvedOnUtrace, unresolvedOnx8664, unsupported |
Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
objectDeclarationSearchEngine
ObjectDeclarationSearchEngine objectDeclarationSearchEngine
TestObjectDeclarationSearchEngine
public TestObjectDeclarationSearchEngine()
getSrc
private File getSrc(String name)
testFindVar1Scopes
public void testFindVar1Scopes()
testFindVar2Scopes
public void testFindVar2Scopes()
testFindArg1Scopes
public void testFindArg1Scopes()
testFindIScopesShadowing
public void testFindIScopesShadowing()
testFindFirstScopesNamespace
public void testFindFirstScopesNamespace()
testFindTwoScopesEnum
public void testFindTwoScopesEnum()
testFindFirstScopesClass
public void testFindFirstScopesClass()
testFindFirstScopes
public void testFindFirstScopes()
testFindFirstElfSymbols
public void testFindFirstElfSymbols()
verifyVariable
private void verifyVariable(String variableName,
String variableToken,
String fileName,
File srcPath)
- Runs the given executable until it sigfaults then searches for the
variable with the given name from that point. Then it verifies that
the line number of the variable found is the same as the line number
in the source file where the given token is.
- Parameters:
variableName
- Name of the variable to search for.variableToken
- a token string from the source file that is found on
the same line as the variable.fileName
- name of the test file.execPath
- path to the executable to be run.srcPath
- path to the source file from which the executable was
created
verifyVariableByValue
private void verifyVariableByValue(String variableName,
String valueString,
String fileName)
- This function should only be used when it is not possible to use
verifyVariable, since it relies on the expression evaluation code
and the type system.
Runs the given executable until it sigfaults then searches for the
variable with the given name from that point. Then it verifies that
variable has the expected value.
- Parameters:
variableName
- Name of the variable to search for.variableToken
- a token string from the source file that is found on
the same line as the variable.fileName
- name of the test file.execPath
- path to the executable to be run.