From 9dd19e0fffd832e3b218e8ac4dfef4cc8bad7910 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 1 Oct 2015 20:06:54 +0200 Subject: Make version class data members public --- tests/package-version/driver.cxx | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'tests') diff --git a/tests/package-version/driver.cxx b/tests/package-version/driver.cxx index d9a54d0..df4d73b 100644 --- a/tests/package-version/driver.cxx +++ b/tests/package-version/driver.cxx @@ -45,7 +45,7 @@ bad_version (uint16_t e, const string& u, uint16_t r) static bool test_constructor (const version& v) { - return v == version (v.epoch (), v.upstream (), v.revision ()); + return v == version (v.epoch, v.upstream, v.revision); } int @@ -89,91 +89,91 @@ main (int argc, char* argv[]) { version v ("a"); assert (v.string () == "a"); - assert (v.canonical_upstream () == "a"); + assert (v.canonical_upstream == "a"); assert (test_constructor (v)); } { version v ("65535+ab-65535"); assert (v.string () == "65535+ab-65535"); - assert (v.canonical_upstream () == "ab"); + assert (v.canonical_upstream == "ab"); assert (test_constructor (v)); } { version v ("1"); assert (v.string () == "1"); - assert (v.canonical_upstream () == "00000001"); + assert (v.canonical_upstream == "00000001"); assert (test_constructor (v)); } { version v ("0"); assert (v.string () == "0"); - assert (v.canonical_upstream ().empty ()); + assert (v.canonical_upstream.empty ()); assert (test_constructor (v)); } { version v ("0.0.0"); assert (v.string () == "0.0.0"); - assert (v.canonical_upstream ().empty ()); + assert (v.canonical_upstream.empty ()); assert (test_constructor (v)); } { version v ("1.0.0"); assert (v.string () == "1.0.0"); - assert (v.canonical_upstream () == "00000001"); + assert (v.canonical_upstream == "00000001"); assert (test_constructor (v)); } { version v ("0.1.00"); assert (v.string () == "0.1.00"); - assert (v.canonical_upstream () == "00000000.00000001"); + assert (v.canonical_upstream == "00000000.00000001"); assert (test_constructor (v)); } { version v ("0.0a.00"); assert (v.string () == "0.0a.00"); - assert (v.canonical_upstream () == "00000000.0a"); + assert (v.canonical_upstream == "00000000.0a"); assert (test_constructor (v)); } { version v ("0.a00.00"); assert (v.string () == "0.a00.00"); - assert (v.canonical_upstream () == "00000000.a00"); + assert (v.canonical_upstream == "00000000.a00"); assert (test_constructor (v)); } { version v ("1+0"); assert (v.string () == "1+0"); - assert (v.canonical_upstream ().empty ()); + assert (v.canonical_upstream.empty ()); assert (test_constructor (v)); } { version v ("0+A-1"); assert (v.string () == "A-1"); - assert (v.canonical_upstream () == "a"); + assert (v.canonical_upstream == "a"); assert (test_constructor (v)); } { version v ("10+B-0"); assert (v.string () == "10+B"); - assert (v.canonical_upstream () == "b"); + assert (v.canonical_upstream == "b"); assert (test_constructor (v)); } { version v ("3+1A.31.0.4.0-7"); assert (v.string () == "3+1A.31.0.4.0-7"); - assert (v.canonical_upstream () == "1a.00000031.00000000.00000004"); + assert (v.canonical_upstream == "1a.00000031.00000000.00000004"); assert (test_constructor (v)); } -- cgit v1.1