Skip to content

Commit

Permalink
chore: update CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoKaios committed Aug 6, 2024
1 parent 3b510b6 commit 094d3e5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 61 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## [0.1.4] Next release

### Added
- Show display example of `NUMERIC-EDITED` data on hover [#337](https://github.com/OCamlPro/superbol-studio-oss/pull/337)
- Improved information shown on completion [#336](https://github.com/OCamlPro/superbol-studio-oss/pull/336)
- Configuration flag for caching in storage provided by Visual Studio Code [#167](https://github.com/OCamlPro/superbol-studio-oss/pull/167)
- Configuration setting for copybook filename extensions [#332](https://github.com/OCamlPro/superbol-studio-oss/pull/332), with updated JSON schema [#333](https://github.com/OCamlPro/superbol-studio-oss/pull/333)
Expand Down
61 changes: 0 additions & 61 deletions src/lsp/cobol_lsp/lsp_picture_interp.ml
Original file line number Diff line number Diff line change
Expand Up @@ -200,64 +200,3 @@ let example_of ~picture value =
with Invalid_argument e ->
Pretty.invalid_arg
"Unable to build example of picture, error '%s'" e


(*
let unit_tests =
[ ("99,B999,B000", 1234., "01, 234, 000");
("99,999", 12345., "12,345");
("999.99", 1.234, "001.23");
("999.99", 12.34, "012.34");
("999.99", 123.45, "123.45");
("999.99", 1234.5, "234.50");
(* ("+999.99E+99", 12345., "+123.45E+02"); *)
("999.99+", +6555.556, "555.55+");
("+9999.99", -6555.555, "-6555.55");
("9999.99", +1234.56, "1234.56");
("$999.99", -123.45, "$123.45");
("-$999.99", -123.456, "-$123.45");
("-$999.99", +123.456, " $123.45");
("$9999.99CR", +123.45, "$0123.45 ");
("$9999.99DB", -123.45, "$0123.45DB");
(* ("U999.99", -123.45, "EUR123.45"); *)
(* ("-u999.99", -123.456, "-USD123.45"); *)
("$$$$.99", 0.123, " $.12");
("$$$9.99", 0.12, " $0.12");
("$,$$$,999.99", -1234.56, " $1,234.56");
(* ("U,UUU,UU9.99-", -1234.56, "EUR1,234.56-"); *)
(* ("u,uuu,uu9.99", 1234.56, "USD1,234.56"); *)
("+,+++,999.99", -123456.789, " -123,456.78");
("$$,$$$,$$$.99CR", -1234567., "$1,234,567.00CR");
("++,+++,+++.+++", 0000.00, " ");
("$B++/+++.+", 0000.00, " ");
("****.**", 0000.00, "****.**");
("ZZZZ.ZZ", 0000.00, " ");
("ZZZZ.99", 0000.00, " .00");
("****.99", 0000.00, "****.00");
("ZZ99.99", 0000.00, " 00.00");
("Z,ZZZ.ZZ+", +123.456, " 123.45+");
("*,***.**+", -123.45, "**123.45-");
("**,***,***.**", +12345678.9, "12,345,678.90");
(* ("$Z,ZZZ,ZZZ.ZZCR", +12345.67, "$ 12,345.67"); *)
("$B*,***.**BBDB", 0., "*******.******");
("$B*,***,***.**BBDB", -12345.67, "$ ***12,345.67 DB");]
module CHARS = Cobol_common.Basics.CharSet
let () =
let config = { max_pic_length = 100; decimal_char = '.';
currency_signs = CHARS.add '$' CHARS.empty }
in
let rec test = function
| [] -> ()
| (pic, value, expected)::tl ->
match of_string config pic with
| Ok picture ->
let example = example_of ~picture value in
let error_msg = Pretty.to_string "ERROR: different result (%s, %f) -> '%s' (expected: '%s')" pic value example expected in
if String.equal example expected
then test tl
else failwith error_msg
| Error _ ->
failwith @@ Pretty.to_string "ERROR: Unable to form picture with picture-string '%s'\n" pic
in test unit_tests *)

0 comments on commit 094d3e5

Please sign in to comment.