Skip to main content
deleted 2 characters in body
Source Link
Doc Brown
  • 220.6k
  • 35
  • 410
  • 625

Unit tests provide examples for the semantics of an API, hence they can be seen as part of the API's documentation. So when a change in a unit test shows a change of the API's semantics, this can give the impression the changed unit test should trigger a bump of the version number.

However, that impression is wrong, since it mixes up cause and effect:

  • when the semantics of a component's API changes, then the component itself must have been changed, which causes the version number to be increased.

  • the necessary change of the unit test is merely a consequence of this.

  • when you add or change a unit test without changing anything else in the component's API, then you either fix a bug in the unit tests, or you document a certain behaviour which was already in the component.

Of course, when your distribution package includes all of the unit tests, and only the unit tests have changed from one release to the next, the distribution package should be given a new patch version number, as Thomas Owens wrote. This makes it clear that the distribution package contains changed content, howeverstill the API has not been changed.

Unit tests provide examples for the semantics of an API, hence they can be seen as part of the API's documentation. So when a change in a unit test shows a change of the API's semantics, this can give the impression the changed unit test should trigger a bump of the version number.

However, that impression is wrong, since it mixes up cause and effect:

  • when the semantics of a component's API changes, then the component itself must have been changed, which causes the version number to be increased.

  • the necessary change of the unit test is merely a consequence of this.

  • when you add or change a unit test without changing anything else in the component's API, then you either fix a bug in the unit tests, or you document a certain behaviour which was already in the component.

Of course, when your distribution package includes all of the unit tests, and only the unit tests have changed from one release to the next, the distribution package should be given a new patch version number, as Thomas Owens wrote. This makes it clear that the distribution package contains changed content, however the API has not been changed.

Unit tests provide examples for the semantics of an API, hence they can be seen as part of the API's documentation. So when a change in a unit test shows a change of the API's semantics, this can give the impression the changed unit test should trigger a bump of the version number.

However, that impression is wrong, since it mixes up cause and effect:

  • when the semantics of a component's API changes, then the component itself must have been changed, which causes the version number to be increased.

  • the necessary change of the unit test is merely a consequence of this.

  • when you add or change a unit test without changing anything else in the component's API, then you either fix a bug in the unit tests, or you document a certain behaviour which was already in the component.

Of course, when your distribution package includes all of the unit tests, and only the unit tests have changed from one release to the next, the distribution package should be given a new patch version number, as Thomas Owens wrote. This makes it clear that the distribution package contains changed content, still the API has not been changed.

added 58 characters in body
Source Link
Doc Brown
  • 220.6k
  • 35
  • 410
  • 625

Unit tests document (parts of)provide examples for the semantics of an API, hence they can be seen as part of the API's documentation. So when a change in a unit test shows a change of the API's semantics, that mightthis can give the impression the changed unit test should trigger a bump of the version number.

However, that impression is wrong, since it mixes up cause and effect:

  • when the semantics of a component's API changes, then the component itself must have been changed, which causes the version number to be increased.

  • the necessary change of the unit test is merely a consequence of this.

  • when you add or change a unit test without changing anything else in the component's API, then you either fix a bug in the unit tests, or you document a certain behaviour which was already in the component.

Of course, when your distribution package includes all of the unit tests, and only the unit tests have changed from one release to the next, the distribution package should be given a new patch version number, as Thomas Owens wrote. This makes it clear that the distribution package contains changed content, however the API has not been changed.

Unit tests document (parts of) the semantics of an API. So when a change in a unit test shows a change of the API's semantics, that might give the impression the changed unit test should trigger a bump of the version number.

However, that impression is wrong, since it mixes up cause and effect:

  • when the semantics of a component's API changes, then the component itself must have been changed, which causes the version number to be increased.

  • the necessary change of the unit test is merely a consequence of this.

  • when you add or change a unit test without changing anything else in the component's API, then you either fix a bug in the unit tests, or you document a certain behaviour which was already in the component.

Of course, when your distribution package includes all of the unit tests, and only the unit tests have changed from one release to the next, the distribution package should be given a new patch version number, as Thomas Owens wrote. This makes it clear that the distribution package contains changed content, however the API has not been changed.

Unit tests provide examples for the semantics of an API, hence they can be seen as part of the API's documentation. So when a change in a unit test shows a change of the API's semantics, this can give the impression the changed unit test should trigger a bump of the version number.

However, that impression is wrong, since it mixes up cause and effect:

  • when the semantics of a component's API changes, then the component itself must have been changed, which causes the version number to be increased.

  • the necessary change of the unit test is merely a consequence of this.

  • when you add or change a unit test without changing anything else in the component's API, then you either fix a bug in the unit tests, or you document a certain behaviour which was already in the component.

Of course, when your distribution package includes all of the unit tests, and only the unit tests have changed from one release to the next, the distribution package should be given a new patch version number, as Thomas Owens wrote. This makes it clear that the distribution package contains changed content, however the API has not been changed.

Add indefinite article before unit. Remove unnecessary hyphens. Fix typos. Change rarely used "increasement" to "increased". "has changed content" could be read in the wrong way so replace with "contains changed content".
Source Link

Unit tests document (parts of) the semantics of an API. So when a change in a unit test shows a change of the API's semantics, that might give the impression the changed unit test should trigger a bump of the version number.

However, that impression is wrong, since it mixes up cause-and-effect and effect:

  • when the semantics of a components'scomponent's API changes, then the component itself must have been changed, which causes the version number increasementto be increased.

  • the necessary change of the unit test is merely a consequence of this.

  • when you add or change a unit test without changing anything else in the component's API, then you either fix a bug in the unit tests, or you document a certain behaviour which was already in the component.

Of course, when your distribution package includes all of the unit tests, and only the unit tests have changed from one release to anotherthe next, the distribution package should havebe given a new patch version number, as Thomas Owens'Owens wrote. That is for to makingThis makes it transparentclear that the distribution package hascontains changed content, though not a change inhowever the API has not been changed.

Unit tests document (parts of) the semantics of an API. So when a change in unit test shows a change of the API's semantics, that might give the impression the changed unit test should trigger a bump of the version number.

However, that impression is wrong, since it mixes up cause-and-effect:

  • when the semantics of a components's API changes, the component itself must have been changed, which causes the version number increasement.

  • the necessary change of the unit test is merely a consequence of this.

  • when you add or change a unit test without changing anything else in the component's API, then you either fix a bug in the unit tests, or you document a certain behaviour which was already in the component.

Of course, when your distribution package includes all unit tests, and only the unit tests have changed from one release to another, the distribution package should have a new patch version, as Thomas Owens' wrote. That is for to making it transparent that the distribution package has changed content, though not a change in the API.

Unit tests document (parts of) the semantics of an API. So when a change in a unit test shows a change of the API's semantics, that might give the impression the changed unit test should trigger a bump of the version number.

However, that impression is wrong, since it mixes up cause and effect:

  • when the semantics of a component's API changes, then the component itself must have been changed, which causes the version number to be increased.

  • the necessary change of the unit test is merely a consequence of this.

  • when you add or change a unit test without changing anything else in the component's API, then you either fix a bug in the unit tests, or you document a certain behaviour which was already in the component.

Of course, when your distribution package includes all of the unit tests, and only the unit tests have changed from one release to the next, the distribution package should be given a new patch version number, as Thomas Owens wrote. This makes it clear that the distribution package contains changed content, however the API has not been changed.

Source Link
Doc Brown
  • 220.6k
  • 35
  • 410
  • 625
Loading