#!/usr/bin/env qore
# -*- mode: qore; indent-tabs-mode: nil -*-

%new-style
%enable-all-warnings
%require-types
%strict-args

%requires ../../../../qlib/QUnit.qm

%exec-class Conversions

public class Conversions inherits QUnit::Test {
    constructor() : Test("ConversionsTest", "1.0") {
        addTestCase("tests", \test());

        # Return for compatibility with test harness that checks return value.
        set_return_value(main());
    }

    test() {
        assertEq(3.1415927, float("3.1415927"));
        assertEq("3.1415927", 3.1415927.toString());
    }
}
