[geany/geany] 58f0a2: Rust: Update test sources to be valid Rust code.
SiegeLord
git-noreply at xxxxx
Tue Jul 29 15:20:56 UTC 2014
Branch: refs/heads/master
Author: SiegeLord <slabode at aim.com>
Committer: SiegeLord <slabode at aim.com>
Date: Tue, 29 Jul 2014 15:20:56 UTC
Commit: 58f0a20bcc640a7973b22b3f7647750eaa1838c2
https://github.com/geany/geany/commit/58f0a20bcc640a7973b22b3f7647750eaa1838c2
Log Message:
-----------
Rust: Update test sources to be valid Rust code.
Modified Paths:
--------------
tests/ctags/test_input.rs
tests/ctags/test_input.rs.tags
tests/ctags/test_input2.rs
Modified: tests/ctags/test_input.rs
20 lines changed, 10 insertions(+), 10 deletions(-)
===================================================================
@@ -1,6 +1,6 @@
#! fn ignored_in_comment() {}
-#[feature(globs)];
-#[feature(macro_rules)];
+#![feature(globs)]
+#![feature(macro_rules)]
use std::*;
use std::io::stdio::println;
use test_input2::*;
@@ -55,18 +55,18 @@ macro_rules! test_macro
macro_rules! ignore (($($x:tt)*) => (()))
-fn yada(a:int,c:Foo,b:test_input2::fruit::SomeStruct) -> ~str {
- a.to_str()
+fn yada(a:int,c:Foo,b:test_input2::fruit::SomeStruct) -> String {
+ a.to_string()
}
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());
+ io::println(foo_bar_test_func(SomeStruct{red_value:1,green_value:2,blue_value:3},(4,5)).to_string().as_slice());
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());
+ println(a.foo_field_1.to_string().as_slice());
ignore!
(
fn ignored_inside_macro() {}
@@ -122,21 +122,21 @@ trait DoZ {
impl Testable for Foo {
fn test(&self) {
- println(self.foo_field_1.to_str());
+ println(self.foo_field_1.to_string().as_slice());
}
fn test1(&self) {
- println(self.foo_field_1.to_str());
+ println(self.foo_field_1.to_string().as_slice());
}
fn test2(&self) {
- println(self.foo_field_1.to_str());
+ println(self.foo_field_1.to_string().as_slice());
}
}
impl DoZ for Foo {
fn do_z(&self) {
- println(self.foo_field_1.to_str());
+ println(self.foo_field_1.to_string().as_slice());
}
}
Modified: tests/ctags/test_input.rs.tags
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -49,4 +49,4 @@ test_macro
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) -> String�0
Modified: tests/ctags/test_input2.rs
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -1,7 +1,7 @@
#![cfg(not(test))] fn not_hashbang() {}
-use std::io::stdio::println;
pub fn foo_bar_test_func(apples:fruit::SomeStruct,(oranges,lemon):(int,int))->int{
+ use std::io::stdio::println;
let some_var_name=2*oranges;
let a=SomeLongStructName{v:0};
println("a");println("b"); println("c");
--------------
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