aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/lib-int.rs
blob: 153c368338134aa8d7ce96dd632d9218430c72f0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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"));
  check (eq(_int.to_str(100, 10u), "100"));
}

fn main() {
  test_to_str();
}