Adds idetools hierarchy nesting test.

This commit is contained in:
Grzegorz Adam Hankiewicz
2013-06-16 22:35:54 +02:00
parent 1f8c5c37d3
commit a1da2b713b
3 changed files with 59 additions and 0 deletions

1
.gitignore vendored
View File

@@ -168,6 +168,7 @@ examples/cross_calculator/android/tags
/testresults.html
/testresults.json
/tests/caas/SymbolProcRun.*/
/tests/caas/absurd_nesting
/tests/caas/forward_declarations
/tests/caas/idetools_api
/tests/caas/imported

View File

@@ -0,0 +1,29 @@
# Tries to test the full ownership path generated by idetools.
proc lev1(t1: string) =
var temp = t1
for i in 0..len(temp)-1:
temp[i] = chr(int(temp[i]) + 1)
proc lev2(t2: string) =
var temp = t2
for i in 0..len(temp)-1:
temp[i] = chr(int(temp[i]) + 1)
proc lev3(t3: string) =
var temp = t3
for i in 0..len(temp)-1:
temp[i] = chr(int(temp[i]) + 1)
proc lev4(t4: string) =
var temp = t4
for i in 0..len(temp)-1:
temp[i] = chr(int(temp[i]) + 1)
echo temp & "(lev4)"
lev4(temp & "(lev3)")
lev3(temp & "(lev2)")
lev2(temp & "(lev1)")
when isMainModule:
lev1("abcd")

View File

@@ -0,0 +1,29 @@
absurd_nesting.nim
> c --verbosity:0 --hints:on
SuccessX
> idetools --track:$TESTNIM,6,6 --def $SILENT
skVar\tabsurd_nesting.lev1.temp\tstring
> idetools --track:$TESTNIM,21,13 --def $SILENT
skVar\tabsurd_nesting.lev1.lev2.lev3.lev4.temp\tstring
> idetools --track:$TESTNIM,6,27 --def $SILENT
skForVar\tabsurd_nesting.lev1.i\tint
> idetools --track:$TESTNIM,21,33 --def $SILENT
skForVar\tabsurd_nesting.lev1.lev1.lev3.lev4.i\tint
> idetools --track:$TESTNIM,24,8 --def $SILENT
skProc\tabsurd_nesting.lev1.lev1.lev3.lev4\tproc \(string\)
> idetools --track:$TESTNIM,4,13 --def $SILENT
skParam\tabsurd_nesting.lev1.t1\tstring
> idetools --track:$TESTNIM,4,13 --def $SILENT
skParam\tabsurd_nesting.lev1.t1\tstring
> idetools --track:$TESTNIM,19,19 --def $SILENT
skParam\tabsurd_nesting.lev1.lev2.lev3.lev4.t4\tstring