Branch: refs/heads/master Author: dobkeratops dobkeratopsgit@gmail.com Committer: SiegeLord slabode@aim.com Date: Tue, 14 Jan 2014 17:50:38 UTC Commit: 09cb24c7c718fe587d1f3f97feff811c05a8ab72 https://github.com/geany/geany/commit/09cb24c7c718fe587d1f3f97feff811c05a8ab...
Log Message: ----------- Add Rust ctag tests
Modified Paths: -------------- tests/ctags/test_input.rs tests/ctags/test_input.rs.tags tests/ctags/test_input2.rs tests/ctags/test_input2.rs.tags
Modified: tests/ctags/test_input.rs 90 files changed, 90 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,90 @@ +#[feature(globs)]; +use std::*; +use test_input2::*; +mod test_input2; + +fn yada(a:int,c:Foo,b:test_input2::fruit::SomeStruct)->~str { a.to_str() } +fn main() { + use test_input2::fruit::*; + io::println(foo_bar_test_func(SomeStruct{red_value:1,green_value:2,blue_value:3},(4,5)).to_str()); + let a=Foo{foo_field_1:2}; + a.my_method(1); + let c=a_cat(3); + let d=Foo{foo_field_1:a.foo_field_1+2}; a.test(); + println(a.foo_field_1.to_str()); +} +struct Bar(int); +struct Baz(int); + +struct Foo{foo_field_1:int} +struct Foo2 { + x:int, + y:int +} + +impl Foo { + fn my_method(&self,_:int){ print("my_method of foo");} +} + +enum Animal { + a_anteater(int), + a_bear(int), + a_cat(int), + a_dog(int), +} + +trait Testable +{ fn test(&self); + fn test1(&self); + fn test2(&self); +} +trait DoZ { + fn do_z(&self); +} + +impl Testable for Foo { + fn test(&self) { + println(self.foo_field_1.to_str()); + } + fn test1(&self) + { + println(self.foo_field_1.to_str()); + } fn test2(&self) + { + println(self.foo_field_1.to_str()); + } + +} +impl DoZ for Foo { + fn do_z(&self) { + println(self.foo_field_1.to_str()); + } +} + +trait SuperTraitTest:Testable+DoZ { +} + +fn gfunc<X:Testable+DoZ>(x:&X) { + let a1=a_anteater(1); + let a2=a_bear(1); + let a3=a_cat(1); + let a4=a_dog(1); + x.test(); + x.do_z(); +} +struct TraitedStructTest<X> { + x:X +} +fn some2(a:Animal) { + match a { + a_cat(x)=> println("cat"), + _ => println("not a cat") + } + +} + + + + + +
Modified: tests/ctags/test_input.rs.tags 33 files changed, 33 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,33 @@ +# format=tagmanager +AnimalÌ2Ö0 +BarÌ2048Ö0 +BazÌ2048Ö0 +DoZÌ32Ö0 +FooÌ1Ö0 +FooÌ2048Ö0 +Foo2Ì2048Ö0 +SuperTraitTestÌ32Ö0 +TestableÌ32Ö0 +TraitedStructTestÌ2048Ö0 +a_anteaterÌ4ÎAnimalÖ0 +a_bearÌ4ÎAnimalÖ0 +a_catÌ4ÎAnimalÖ0 +a_dogÌ4ÎAnimalÖ0 +do_zÌ128Í(&self)ÎDoZÖ0 +do_zÌ128Í(&self)ÎFooÖ0 +foo_field_1Ì8ÎFooÖ0 +gfuncÌ16Í<X:Testable+DoZ>(x:&X)Ö0 +mainÌ16Í()Ö0 +my_methodÌ128Í(&self,_:int)ÎFooÖ0 +some2Ì16Í(a:Animal)Ö0 +testÌ128Í(&self)ÎFooÖ0 +testÌ128Í(&self)ÎTestableÖ0 +test1Ì128Í(&self)ÎFooÖ0 +test1Ì128Í(&self)ÎTestableÖ0 +test2Ì128Í(&self)ÎFooÖ0 +test2Ì128Í(&self)ÎTestableÖ0 +test_input2Ì256Ö0 +xÌ8ÎFoo2Ö0 +xÌ8ÎTraitedStructTestÖ0 +yÌ8ÎFoo2Ö0 +yadaÌ16Í(a:int,c:Foo,b:test_input2::fruit::SomeStruct)->~strÖ0
Modified: tests/ctags/test_input2.rs 43 files changed, 43 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,43 @@ +pub fn foo_bar_test_func(apples:fruit::SomeStruct,(oranges,lemon):(int,int))->int{ + let some_var_name=2*oranges; + let a=SomeLongStructName{v:0}; + println("a");println("b"); println("c"); + veg::another_function(apples.red_value,oranges,lemon); + some_var_name-apples.red_value+lemon+a.v +} + + +pub mod fruit { + pub struct SomeStruct{ + red_value:int,green_value:int,blue_value:int + } +} +fn free_func() { +} + +impl SomeLongStructName { + fn fooo() { + } + fn baaz() { + } +} + + +pub struct SomeLongStructName {v:int} + +mod veg{ + pub fn another_function(a:int,b:int,c:int)->int { + a+b+c + } +} + + + +mod mineral { + fn granite() { + } + fn limestone() { + } + fn chalk() { + } +}
Modified: tests/ctags/test_input2.rs.tags 19 files changed, 19 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,19 @@ +# format=tagmanager +SomeLongStructNameÌ1Ö0 +SomeLongStructNameÌ2048Ö0 +SomeStructÌ2048ÎfruitÖ0 +another_functionÌ16Í(a:int,b:int,c:int)->intÎvegÖ0 +baazÌ128Í()ÎSomeLongStructNameÖ0 +blue_valueÌ8Îfruit::SomeStructÖ0 +chalkÌ16Í()ÎmineralÖ0 +foo_bar_test_funcÌ16Í(apples:fruit::SomeStruct,(oranges,lemon):(int,int))->intÖ0 +foooÌ128Í()ÎSomeLongStructNameÖ0 +free_funcÌ16Í()Ö0 +fruitÌ256Ö0 +graniteÌ16Í()ÎmineralÖ0 +green_valueÌ8Îfruit::SomeStructÖ0 +limestoneÌ16Í()ÎmineralÖ0 +mineralÌ256Ö0 +red_valueÌ8Îfruit::SomeStructÖ0 +vÌ8ÎSomeLongStructNameÖ0 +vegÌ256Ö0
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).