aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/lib-int.rs
blob: ecca40b98bbb4b789eaa5f3510edb92fb55b45c9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std;

import std._int;
import std._str.eq;

fn test_to_str() {
  check (eq(_int.to_str(0, 10u), "0"));
  check (eq(_int.to_str(1, 10u), "1"));
  check (eq(_int.to_str(-1, 10u), "-1"));
  check (eq(_int.to_str(255, 16u), "ff"));
}

fn main() {
  test_to_str();
}