Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
62651df2
R
Rust
项目概览
int
/
Rust
12 个月 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
62651df2
编写于
3月 07, 2013
作者:
A
Alex Crichton
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix dvec-related fallout in tests
上级
59de3853
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
17 addition
and
53 deletion
+17
-53
src/libcore/io.rs
src/libcore/io.rs
+3
-5
src/libstd/flatpipes.rs
src/libstd/flatpipes.rs
+6
-9
src/libstd/json.rs
src/libstd/json.rs
+3
-6
src/libsyntax/parse/mod.rs
src/libsyntax/parse/mod.rs
+3
-3
src/test/run-pass/call-closure-from-overloaded-op.rs
src/test/run-pass/call-closure-from-overloaded-op.rs
+1
-1
src/test/run-pass/issue-2631-b.rs
src/test/run-pass/issue-2631-b.rs
+1
-2
src/test/run-pass/issue-5275
src/test/run-pass/issue-5275
+0
-0
src/test/run-pass/issue-5275.rs
src/test/run-pass/issue-5275.rs
+0
-27
未找到文件。
src/libcore/io.rs
浏览文件 @
62651df2
...
...
@@ -1442,17 +1442,15 @@ fn buffered_file_writer_bad_name() {
fn
bytes_buffer_overwrite
()
{
let
wr
=
BytesWriter
();
wr
.write
(
~
[
0u8
,
1u8
,
2u8
,
3u8
]);
fail_unless!
(
wr
.bytes
.borrow
(|
bytes
|
bytes
==
~
[
0u8
,
1u8
,
2u8
,
3u8
])
);
fail_unless!
(
wr
.bytes
==
~
[
0u8
,
1u8
,
2u8
,
3u8
]
);
wr
.seek
(
-
2
,
SeekCur
);
wr
.write
(
~
[
4u8
,
5u8
,
6u8
,
7u8
]);
fail_unless!
(
wr
.bytes
.borrow
(|
bytes
|
bytes
==
~
[
0u8
,
1u8
,
4u8
,
5u8
,
6u8
,
7u8
]));
fail_unless!
(
wr
.bytes
==
~
[
0u8
,
1u8
,
4u8
,
5u8
,
6u8
,
7u8
]);
wr
.seek
(
-
2
,
SeekEnd
);
wr
.write
(
~
[
8u8
]);
wr
.seek
(
1
,
SeekSet
);
wr
.write
(
~
[
9u8
]);
fail_unless!
(
wr
.bytes
.borrow
(|
bytes
|
bytes
==
~
[
0u8
,
9u8
,
4u8
,
5u8
,
8u8
,
7u8
]));
fail_unless!
(
wr
.bytes
==
~
[
0u8
,
9u8
,
4u8
,
5u8
,
8u8
,
7u8
]);
}
#[test]
...
...
src/libstd/flatpipes.rs
浏览文件 @
62651df2
...
...
@@ -452,13 +452,10 @@ pub fn deserialize_buffer<D: Decoder + FromReader,
pub
fn
serialize_value
<
D
:
Encoder
+
FromWriter
,
T
:
Encodable
<
D
>>
(
val
:
&
T
)
->
~
[
u8
]
{
let
mut
bytes_writer
=
BytesWriter
();
let
writer
=
@
bytes_writer
as
@
Writer
;
let
ser
=
FromWriter
::
from_writer
(
writer
);
val
.encode
(
&
ser
);
let
mut
ret
=
~
[];
ret
<->
bytes_writer
.bytes
;
return
ret
;
do
io
::
with_bytes_writer
|
writer
|
{
let
ser
=
FromWriter
::
from_writer
(
writer
);
val
.encode
(
&
ser
);
}
}
pub
trait
FromReader
{
...
...
@@ -652,7 +649,7 @@ fn test_serializing_memory_stream() {
chan
.send
(
10
);
let
bytes
=
c
han
.byte_chan.writer.bytes
.get
()
;
let
bytes
=
c
opy
chan
.byte_chan.writer.bytes
;
let
reader
=
BufReader
::
new
(
bytes
);
let
port
=
serial
::
reader_port
(
reader
);
...
...
@@ -698,7 +695,7 @@ fn test_pod_memory_stream() {
chan
.send
(
10
);
let
bytes
=
c
han
.byte_chan.writer.bytes
.get
()
;
let
bytes
=
c
opy
chan
.byte_chan.writer.bytes
;
let
reader
=
BufReader
::
new
(
bytes
);
let
port
=
pod
::
reader_port
(
reader
);
...
...
src/libstd/json.rs
浏览文件 @
62651df2
...
...
@@ -1311,8 +1311,7 @@ fn test_write_enum () {
}
}
}
check_equal
(
str
::
from_bytes
(
bw
.bytes.data
),
~
"[
\"
frog
\"
,[
\"
Henry
\"
,349]]"
);
check_equal
(
str
::
from_bytes
(
bw
.bytes
),
~
"[
\"
frog
\"
,[
\"
Henry
\"
,349]]"
);
}
#[test]
...
...
@@ -1327,8 +1326,7 @@ fn test_write_some () {
}
}
}
check_equal
(
str
::
from_bytes
(
bw
.bytes.data
),
~
"
\"
jodhpurs
\"
"
);
check_equal
(
str
::
from_bytes
(
bw
.bytes
),
~
"
\"
jodhpurs
\"
"
);
}
#[test]
...
...
@@ -1340,8 +1338,7 @@ fn test_write_none () {
do
encoder
.emit_enum_variant
(
~
"None"
,
37
,
1242
)
{
}
}
check_equal
(
str
::
from_bytes
(
bw
.bytes.data
),
~
"null"
);
check_equal
(
str
::
from_bytes
(
bw
.bytes
),
~
"null"
);
}
#[test]
...
...
src/libsyntax/parse/mod.rs
浏览文件 @
62651df2
...
...
@@ -303,9 +303,9 @@ mod test {
use
util
::
testing
::
*
;
#[test]
fn
to_json_str
(
val
:
Encodable
<
std
::
json
::
Encoder
>
)
->
~
str
{
let
bw
=
@
io
::
BytesWriter
();
val
.encode
(
~
std
::
json
::
Encoder
(
bw
as
io
::
W
riter
));
str
::
from_bytes
(
bw
.bytes.data
)
do
io
::
with_str_writer
|
writer
|
{
val
.encode
(
~
std
::
json
::
Encoder
(
w
riter
));
}
}
#[test]
fn
alltts
()
{
...
...
src/test/run-pass/call-closure-from-overloaded-op.rs
浏览文件 @
62651df2
...
...
@@ -11,7 +11,7 @@
fn
foo
()
->
int
{
22
}
pub
fn
main
()
{
let
x
:
~
[
@
fn
()
->
int
]
=
~
[];
let
mut
x
:
~
[
@
fn
()
->
int
]
=
~
[];
x
.push
(
foo
);
fail_unless!
((
x
[
0
])()
==
22
);
}
src/test/run-pass/issue-2631-b.rs
浏览文件 @
62651df2
...
...
@@ -15,12 +15,11 @@
extern
mod
std
;
use
req
::
*
;
use
std
::
oldmap
::
*
;
use
std
::
oldmap
::
HashMap
;
pub
fn
main
()
{
let
v
=
~
[
@~
"hi"
];
let
m
:
req
::
header_map
=
HashMap
();
m
.insert
(
~
"METHOD"
,
@
mut
~
[
v
]
);
m
.insert
(
~
"METHOD"
,
@
mut
v
);
request
::
<
int
>
(
m
);
}
src/test/run-pass/issue-5275
已删除
100755 → 0
浏览文件 @
59de3853
文件已删除
src/test/run-pass/issue-5275.rs
已删除
100644 → 0
浏览文件 @
59de3853
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn
foo
(
self
:
&
A
)
->
int
{
if
true
{
fail
!
()
}
else
{
*
bar
(
self
.bar
)
}
}
pub
fn
main
()
{}
fn
bar
(
_
:
&
r
/
mut
int
)
->
&
r
/
int
{
fail
!
()
}
struct
A
{
bar
:
@
mut
int
,
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录