All files / src version.ts

90.91% Statements 20/22
66.67% Branches 4/6
100% Functions 2/2
90.91% Lines 20/22

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 311x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x     1x   1x 93x   93x 93x   93x       93x      
export enum Version {
  v700 = "v700",
  v702 = "v702",
  v740sp02 = "v740sp02",
  v740sp05 = "v740sp05",
  v740sp08 = "v740sp08",
  v750 = "v750",
  v751 = "v751",
  v752 = "v752",
  v753 = "v753",
  v754 = "v754",
  v755 = "v755",
  Cloud = "Cloud",
}
 
export const defaultVersion = Version.v755;
 
export function getPreviousVersion(v: Version): Version {
  const all = Object.values(Version);
 
  const found = all.indexOf(v);
  Iif (found < 0) {
    throw "Unknown version: " + v;
  } else Iif (found === 0) {
    throw "Nothing lower: " + v;
  }
 
  return all[found - 1];
}