Skip to content

Commit

Permalink
merging main
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanegv committed Feb 28, 2024
2 parents aac865a + 4b1e331 commit 4b37379
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 7 deletions.
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. Windows]
- Version [e.g. 1.0.0]

**Additional content**
Add any other informations about the problem you think might be helpful.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: feature request
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Add a real world example (Optionaly)**
Some code that describe the use of this feature in a real world situation

**Additional context**
Add any other context or screenshots about the feature request here that might be helpful.
4 changes: 2 additions & 2 deletions interpreter/eclaType/float.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ func (f Float) SetValue(value any) error {
}

func (f Float) String() string {
return fmt.Sprintf("%f", f)
return fmt.Sprintf("%g", f)
}

// GetString returns the string representation of the float
func (f Float) GetString() String {
return String(fmt.Sprint(f))
return String(f.String())
}

// GetType returns the type Float
Expand Down
4 changes: 2 additions & 2 deletions interpreter/eclaType/float_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,11 @@ func TestAddFloatString(t *testing.T) {
if err != nil {
t.Error(err)
}
expect1, _ := strconv.ParseFloat("3.14", 32)
Newexpect1 := fmt.Sprintf("%6f", expect1)
Newexpect1 := fmt.Sprintf("%g", 3.14)
expect2 := "hello"
expect := Newexpect1 + expect2
expected := String(expect)
fmt.Println(expected)
if result.GetValue() != expected {
t.Errorf("Expected %v, got %v", expected, result)
}
Expand Down
4 changes: 1 addition & 3 deletions interpreter/eclaType/string_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package eclaType

import (
"fmt"
"strconv"
"testing"
)

Expand Down Expand Up @@ -59,8 +58,7 @@ func TestAddStringFloat(t *testing.T) {
if err != nil {
t.Error(err)
}
expect1, _ := strconv.ParseFloat("1.1", 32)
Newexpect1 := fmt.Sprintf("%6f", expect1)
Newexpect1 := fmt.Sprintf("%g", 1.1)
expect2 := "Hello"
expect := expect2 + Newexpect1
expected := String(expect)
Expand Down

0 comments on commit 4b37379

Please sign in to comment.