Skip to content

Commit

Permalink
Fix order of parameters for the parseint function (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaid-Ajaj authored Nov 14, 2023
1 parent 2a833bc commit a7863a7
Showing 3 changed files with 15 additions and 13 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG_PENDING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
### Improvements

### Bug Fixes

- Fix order of parameters for the `parseint` function
24 changes: 12 additions & 12 deletions pkg/convert/testdata/programs/builtin_functions/pcl/main.pp
Original file line number Diff line number Diff line change
@@ -898,38 +898,38 @@
# Examples for parseint
output "funcParseint0" {
value = invoke("std:index:parseint", {
base = "100"
input = 10
input = "100"
base = 10
}).result
}
output "funcParseint1" {
value = invoke("std:index:parseint", {
base = "FF"
input = 16
input = "FF"
base = 16
}).result
}
output "funcParseint2" {
value = invoke("std:index:parseint", {
base = "-10"
input = 16
input = "-10"
base = 16
}).result
}
output "funcParseint3" {
value = invoke("std:index:parseint", {
base = "1011111011101111"
input = 2
input = "1011111011101111"
base = 2
}).result
}
output "funcParseint4" {
value = invoke("std:index:parseint", {
base = "aA"
input = 62
input = "aA"
base = 62
}).result
}
output "funcParseint5" {
value = invoke("std:index:parseint", {
base = "12"
input = 2
input = "12"
base = 2
}).result
}

2 changes: 1 addition & 1 deletion pkg/convert/tf.go
Original file line number Diff line number Diff line change
@@ -615,7 +615,7 @@ var tfFunctionStd = map[string]struct {
},
"parseint": {
token: "std:index:parseint",
inputs: []string{"base", "input"},
inputs: []string{"input", "base"},
output: "result",
},
"pathexpand": {

0 comments on commit a7863a7

Please sign in to comment.