Re: Review Request 58706: Improved unit tests for Version in stout.

2017-04-26 Thread Neil Conway

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58706/
---

(Updated April 26, 2017, 5:35 p.m.)


Review request for mesos, Benjamin Mahler and Kapil Arya.


Changes
---

Addressed review comments, fix compile error with old G++.


Bugs: MESOS-1987
https://issues.apache.org/jira/browse/MESOS-1987


Repository: mesos


Description
---

Switch to table-based test cases, validate that version parsing produces
the expected results more precisely.


Diffs (updated)
-

  3rdparty/stout/tests/version_tests.cpp 
724ed2292fdd3c5f4c98facf82260078b66a0e97 


Diff: https://reviews.apache.org/r/58706/diff/3/

Changes: https://reviews.apache.org/r/58706/diff/2-3/


Testing
---

`make check`


Thanks,

Neil Conway



Re: Review Request 58706: Improved unit tests for Version in stout.

2017-04-25 Thread Benjamin Mahler

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58706/#review172988
---


Ship it!





3rdparty/stout/tests/version_tests.cpp
Lines 58-63 (original), 70-82 (patched)


We could simplify this a bit:

```
Try actual = Version::parse(input);

ASSERT_SOME_EQ(std::get<0>(expected), actual)
  << "Incorrect parse of input '" << input << "'";

EXPECT_EQ(std::get<1>(expected), stringify(actual.get()))
  << "Incorrect parse of input '" << input << "'";
```



3rdparty/stout/tests/version_tests.cpp
Lines 86 (patched)


This reads to me that malformed input strings can be parsed, maybe 
re-phrase? Also would be nice to use consistent terminology ("malformed" vs 
"invalid") here



3rdparty/stout/tests/version_tests.cpp
Line 64 (original), 86-106 (patched)


Naming wise, how about:

```
const vector inputs = {...};

foreach (const string& input, inputs) {
  Try parse = Version::parse(input);
  // Or:
  Try version = Version::parse(input);
  ...
}
```

Actual seems a bit out of place in this one given there's no "expected" to 
go along with it.


- Benjamin Mahler


On April 25, 2017, 8:03 p.m., Neil Conway wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58706/
> ---
> 
> (Updated April 25, 2017, 8:03 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Kapil Arya.
> 
> 
> Bugs: MESOS-1987
> https://issues.apache.org/jira/browse/MESOS-1987
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Switch to table-based test cases, validate that version parsing produces
> the expected results more precisely.
> 
> 
> Diffs
> -
> 
>   3rdparty/stout/tests/version_tests.cpp 
> 724ed2292fdd3c5f4c98facf82260078b66a0e97 
> 
> 
> Diff: https://reviews.apache.org/r/58706/diff/2/
> 
> 
> Testing
> ---
> 
> `make check`
> 
> 
> Thanks,
> 
> Neil Conway
> 
>



Re: Review Request 58706: Improved unit tests for Version in stout.

2017-04-25 Thread Neil Conway

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58706/
---

(Updated April 25, 2017, 8:03 p.m.)


Review request for mesos, Benjamin Mahler and Kapil Arya.


Changes
---

Tweak.


Bugs: MESOS-1987
https://issues.apache.org/jira/browse/MESOS-1987


Repository: mesos


Description
---

Switch to table-based test cases, validate that version parsing produces
the expected results more precisely.


Diffs (updated)
-

  3rdparty/stout/tests/version_tests.cpp 
724ed2292fdd3c5f4c98facf82260078b66a0e97 


Diff: https://reviews.apache.org/r/58706/diff/2/

Changes: https://reviews.apache.org/r/58706/diff/1-2/


Testing
---

`make check`


Thanks,

Neil Conway



Re: Review Request 58706: Improved unit tests for Version in stout.

2017-04-25 Thread Kapil Arya

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58706/#review172937
---


Fix it, then Ship it!





3rdparty/stout/tests/version_tests.cpp
Line 53 (original), 65 (patched)


Please add the tagged version back.


- Kapil Arya


On April 25, 2017, 11:09 a.m., Neil Conway wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58706/
> ---
> 
> (Updated April 25, 2017, 11:09 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Kapil Arya.
> 
> 
> Bugs: MESOS-1987
> https://issues.apache.org/jira/browse/MESOS-1987
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Switch to table-based test cases, validate that version parsing produces
> the expected results more precisely.
> 
> 
> Diffs
> -
> 
>   3rdparty/stout/tests/version_tests.cpp 
> 724ed2292fdd3c5f4c98facf82260078b66a0e97 
> 
> 
> Diff: https://reviews.apache.org/r/58706/diff/1/
> 
> 
> Testing
> ---
> 
> `make check`
> 
> 
> Thanks,
> 
> Neil Conway
> 
>



Review Request 58706: Improved unit tests for Version in stout.

2017-04-25 Thread Neil Conway

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58706/
---

Review request for mesos and Benjamin Mahler.


Bugs: MESOS-1987
https://issues.apache.org/jira/browse/MESOS-1987


Repository: mesos


Description
---

Switch to table-based test cases, validate that version parsing produces
the expected results more precisely.


Diffs
-

  3rdparty/stout/tests/version_tests.cpp 
724ed2292fdd3c5f4c98facf82260078b66a0e97 


Diff: https://reviews.apache.org/r/58706/diff/1/


Testing
---

`make check`


Thanks,

Neil Conway