-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
31 lines (23 loc) · 892 Bytes
/
main.go
File metadata and controls
31 lines (23 loc) · 892 Bytes
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
31
package main
import "github.com/tinywasm/fmt"
func main() {
// EQUIVALENT FUNCTIONALITY TEST - Same operations, same complexity
// Both implementations should do EXACTLY the same work
// Test 1: Basic string operations
text1 := "Hello World Example"
result1 := fmt.Convert(text1).ToLower().Replace(" ", "_").String()
// Test 2: Number formatting
num1 := 1234.567
result2 := fmt.Convert(num1).Round(2).String()
// Test 3: Multiple string operations
text2 := "Processing Multiple Strings"
result3 := fmt.Convert(text2).ToUpper().Replace(" ", "-").String()
// Test 4: Join operations
items := []string{"item1", "item2", "item3"}
result4 := fmt.Convert(items).Join(", ").String()
// Test 5: Fmt operations
result5 := fmt.Sprintf("Result: %s | Number: %s | Upper: %s | List: %s",
result1, result2, result3, result4)
// Use results to prevent optimization
_ = result5
}