#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,abm,avx,mmx,popcnt,tune=native")
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long n, c0, c1, h, cnt0 = 0, cnt1 = 0;
    string s;
    cin >> n >> c0 >> c1 >> h;
    cin >> s;
    for (int i = 0; i <= s.size() - 1; i++) {
      if (s[i] == '0')
        cnt0++;
      else
        cnt1++;
    }
    if (c1 > c0) c1 = min(c1, c0 + h);
    if (c0 > c1) c0 = min(c0, c1 + h);
    cout << c0 * cnt0 + c1 * cnt1 << '\n';
  }
}
