[geany/geany] 416c3d: Clean up Rust ctag tests and make them more comprehensive
SiegeLord
git-noreply at xxxxx
Tue Jan 14 17:50:38 UTC 2014
Branch: refs/heads/master
Author: SiegeLord <slabode at aim.com>
Committer: SiegeLord <slabode at aim.com>
Date: Tue, 14 Jan 2014 17:50:38 UTC
Commit: 416c3daecc649b63c96503f5c43de37b19220b11
https://github.com/geany/geany/commit/416c3daecc649b63c96503f5c43de37b19220b11
Log Message:
-----------
Clean up Rust ctag tests and make them more comprehensive
Modified Paths:
--------------
tests/ctags/test_input.rs
tests/ctags/test_input.rs.tags
tests/ctags/test_input2.rs
Modified: tests/ctags/test_input.rs
72 files changed, 60 insertions(+), 12 deletions(-)
===================================================================
@@ -1,9 +1,36 @@
+#! fn ignored_in_comment() {}
#[feature(globs)];
+#[feature(macro_rules)];
use std::*;
use test_input2::*;
mod test_input2;
-fn yada(a:int,c:Foo,b:test_input2::fruit::SomeStruct)->~str { a.to_str() }
+/*
+ * fn ignored_in_comment() {}
+ */
+
+// fn ignored_in_comment() {}
+
+/* /*
+ * */
+ fn ignored_in_nested_comment() {}
+ */
+
+static size: uint = 1;
+
+struct S1 {
+ only_field: [int, ..size]
+}
+
+macro_rules! test_macro
+{
+ () => {1}
+}
+
+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());
@@ -12,11 +39,25 @@ fn main() {
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());
+ ignore!
+ (
+ fn ignored_inside_macro() {}
+ )
+
+ let _ = "fn ignored_in_string() {}
+ ";
+
+ let _ = r##"fn ignored_in_raw_string() {}""##;
+
+ fn nested() {}
}
+
struct Bar(int);
+
struct Baz(int);
struct Foo{foo_field_1:int}
+
struct Foo2 {
x:int,
y:int
@@ -38,6 +79,7 @@ trait Testable
fn test1(&self);
fn test2(&self);
}
+
trait DoZ {
fn do_z(&self);
}
@@ -46,15 +88,16 @@ 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)
- {
+
+ 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());
@@ -72,9 +115,20 @@ fn gfunc<X:Testable+DoZ>(x:&X) {
x.test();
x.do_z();
}
+
struct TraitedStructTest<X> {
x:X
}
+
+trait ParametrizedTrait<T> {
+ fn test(&self);
+}
+
+impl<T: Clone> ParametrizedTrait<T> for TraitedStructTest<T> {
+ fn test(&self) {
+ }
+}
+
fn some2(a:Animal) {
match a {
a_cat(x)=> println("cat"),
@@ -82,9 +136,3 @@ fn some2(a:Animal) {
}
}
-
-
-
-
-
-
Modified: tests/ctags/test_input.rs.tags
11 files changed, 10 insertions(+), 1 deletions(-)
===================================================================
@@ -6,8 +6,11 @@ DoZ
FooÌ1Ö0
FooÌ2048Ö0
Foo2Ì2048Ö0
+ParametrizedTraitÌ32Ö0
+S1Ì2048Ö0
SuperTraitTestÌ32Ö0
TestableÌ32Ö0
+TraitedStructTestÌ1Ö0
TraitedStructTestÌ2048Ö0
a_anteaterÌ4ÎAnimalÖ0
a_bearÌ4ÎAnimalÖ0
@@ -19,15 +22,21 @@ foo_field_1
gfuncÌ16Í<X:Testable+DoZ>(x:&X)Ö0
mainÌ16Í()Ö0
my_methodÌ128Í(&self,_:int)ÎFooÖ0
+nestedÌ16Í()ÎmainÖ0
+only_fieldÌ8ÎS1Ö0
+sizeÌ16384Ö0
some2Ì16Í(a:Animal)Ö0
testÌ128Í(&self)ÎFooÖ0
+testÌ128Í(&self)ÎParametrizedTraitÖ0
testÌ128Í(&self)ÎTestableÖ0
+testÌ128Í(&self)ÎTraitedStructTestÖ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
+test_macroÌ65536Ö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
+yadaÌ16Í(a:int,c:Foo,b:test_input2::fruit::SomeStruct) -> ~strÖ0
Modified: tests/ctags/test_input2.rs
5 files changed, 1 insertions(+), 4 deletions(-)
===================================================================
@@ -6,12 +6,12 @@ pub fn foo_bar_test_func(apples:fruit::SomeStruct,(oranges,lemon):(int,int))->in
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() {
}
@@ -22,7 +22,6 @@ impl SomeLongStructName {
}
}
-
pub struct SomeLongStructName {v:int}
mod veg{
@@ -31,8 +30,6 @@ mod veg{
}
}
-
-
mod mineral {
fn granite() {
}
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list