github.com/LanderTome/numerologyCalculator@v1.0.2/numerology/hiddenPassion_test.go (about)

     1  // Copyright 2021 Robert D. Wukmir
     2  // This file is subject to the terms and conditions defined in
     3  // the LICENSE file, which is part of this source code package.
     4  //
     5  // Unless required by applicable law or agreed to in writing,
     6  // software distributed under the License is distributed on an
     7  // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
     8  // either express or implied. See the License for the specific
     9  // language governing permissions and limitations under the
    10  // License.
    11  
    12  package numerology
    13  
    14  import (
    15  	"reflect"
    16  	"testing"
    17  )
    18  
    19  func Test_hiddenPassion(t *testing.T) {
    20  	type args struct {
    21  		name         string
    22  		numberSystem NumberSystem
    23  	}
    24  	tests := []struct {
    25  		name string
    26  		args args
    27  		want HiddenPassionResults
    28  	}{
    29  		{"Alphabet", args{"abCdefghiJklmnOpqrstuvwxyz", Pythagorean}, HiddenPassionResults{
    30  			Numbers:  []int{1, 2, 3, 4, 5, 6, 7, 8},
    31  			MaxCount: 3,
    32  		}},
    33  	}
    34  	for _, tt := range tests {
    35  		t.Run(tt.name, func(t *testing.T) {
    36  			counts, _, _ := countNumerologicalNumbers(tt.args.name, tt.args.numberSystem)
    37  			if got := hiddenPassions(counts); !reflect.DeepEqual(got, tt.want) {
    38  				t.Errorf("hiddenPassions() = %v, want %v", got, tt.want)
    39  			}
    40  		})
    41  	}
    42  }