<feed xmlns='http://www.w3.org/2005/Atom'>
<title>7Units/src/test/java/sevenUnits/unit, branch v1.0.0b2</title>
<subtitle>A unit converter made in Java, inspired by GNU Units
</subtitle>
<id>https://git.ahopkins.ca/7units.git/atom?h=v1.0.0b2</id>
<link rel='self' href='https://git.ahopkins.ca/7units.git/atom?h=v1.0.0b2'/>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/'/>
<updated>2025-05-31T01:30:44Z</updated>
<entry>
<title>Ensure LinearUnit&amp;Prefix ==/hash obey contracts</title>
<updated>2025-05-31T01:30:44Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>adrien.p.hopkins@gmail.com</email>
</author>
<published>2025-05-31T01:10:09Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=7db19d307970b73559239ec343c92c7876510c2a'/>
<id>urn:sha1:7db19d307970b73559239ec343c92c7876510c2a</id>
<content type='text'>
Previously, these classes' equals() and hashCode() methods did not obey
the contracts:

For equals(), I considered two values equal even if there was a very
small deviation, in order to avoid floating-point error.  This equals
relation is not transitive (i.e. it is possible that a = b &amp;&amp; b = c but
a ≠ c), violating the contract of equals.

This also makes it impossible to properly implement hashCode, as if two
values are equal, they must have the same hash code.  The solution I had
provided is an ineffective hack, which could mess with hash maps and
sets.

I have changed the implementation to demand exact equality.  I have also
provided equalsApproximately() methods to both classes that use the old
behaviour.  Hash codes are only really used for hash maps, and the old
implementation doesn't even achieve its purpose, so I did not add a
method to return the old hash behaviour.
</content>
</entry>
<entry>
<title>Remove Unitlike/MultiUnit</title>
<updated>2025-05-31T00:54:19Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>adrien.p.hopkins@gmail.com</email>
</author>
<published>2025-05-31T00:48:42Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=e86fb71e1665cb9e8511bafd54df0fb8cbca5adc'/>
<id>urn:sha1:e86fb71e1665cb9e8511bafd54df0fb8cbca5adc</id>
<content type='text'>
I ended up never using this code - it was simpler to just use lists of
units and values.  Making a whole new object for lists of units, and an
abstract class for things that convert things other than doubles, is
needlessly complicated, and doesn't solve any major issues.  For
example, I still need to store each Unitlike type in a different
collection, because it will have a different type.
</content>
</entry>
<entry>
<title>Add more UnitDatabase tests</title>
<updated>2025-04-30T21:42:01Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>adrien.p.hopkins@gmail.com</email>
</author>
<published>2025-04-30T21:42:01Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=4910b914392753986526bc28102ddef42e275e6c'/>
<id>urn:sha1:4910b914392753986526bc28102ddef42e275e6c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add tests for LinearUnitValue</title>
<updated>2025-03-07T16:47:53Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>adrien.p.hopkins@gmail.com</email>
</author>
<published>2025-03-07T16:13:50Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=deb4a650caf9eb49d32810e573f22bbd77f0ca47'/>
<id>urn:sha1:deb4a650caf9eb49d32810e573f22bbd77f0ca47</id>
<content type='text'>
I specifically added tests for the methods that Jacoco says haven't been
tested:
- convertToMultiple
- equals
- equivalent
- hashCode
- operation methods
</content>
</entry>
<entry>
<title>Show unit/dim file errors as popup</title>
<updated>2024-08-22T16:45:37Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>adrien.p.hopkins@gmail.com</email>
</author>
<published>2024-08-22T16:41:04Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=ea3e2bf07939926e43c7abe3fd13a7c4e93f69d1'/>
<id>urn:sha1:ea3e2bf07939926e43c7abe3fd13a7c4e93f69d1</id>
<content type='text'>
Previously, any error in the unit or dimension file(s) crashes the
program.  Instead, 7Units now ignores any invalid lines, still parsing
the correct ones, and shows a popup in case any errors happen.
</content>
</entry>
<entry>
<title>Correct encoding of ±</title>
<updated>2024-08-15T22:26:34Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>adrien.p.hopkins@gmail.com</email>
</author>
<published>2024-08-15T21:47:24Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=fbb2f4a997e7e7043a2bdf15303b88907f6bcbc6'/>
<id>urn:sha1:fbb2f4a997e7e7043a2bdf15303b88907f6bcbc6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Format source code &amp; set explicit UTF-8</title>
<updated>2024-03-24T18:14:11Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>adrien.p.hopkins@gmail.com</email>
</author>
<published>2024-03-24T18:14:11Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=26291e672b0e683edc9d57710a9a9d96ca199c45'/>
<id>urn:sha1:26291e672b0e683edc9d57710a9a9d96ca199c45</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Added documentation to undocumented tests</title>
<updated>2022-07-09T18:53:26Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>ahopk127@my.yorku.ca</email>
</author>
<published>2022-07-09T18:53:26Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=8b124b2437d53d70444f31ef52e00b8d7463c636'/>
<id>urn:sha1:8b124b2437d53d70444f31ef52e00b8d7463c636</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Implemented one-way conversion, duplicate prefixes can now be hidden</title>
<updated>2022-04-18T22:41:43Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>ahopk127@my.yorku.ca</email>
</author>
<published>2022-04-18T22:41:43Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=40f7b6e806140fc2fc741c63c71f5ce97b4bd1d2'/>
<id>urn:sha1:40f7b6e806140fc2fc741c63c71f5ce97b4bd1d2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Implemented rounding and duplicate-removal settings into the new GUI</title>
<updated>2022-04-18T22:15:22Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>ahopk127@my.yorku.ca</email>
</author>
<published>2022-04-18T22:01:54Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=f0541a955b6e4b12d808cffec0874f50a004e8b9'/>
<id>urn:sha1:f0541a955b6e4b12d808cffec0874f50a004e8b9</id>
<content type='text'>
</content>
</entry>
</feed>
