#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, c0, c1, h, i, j, count0, count1, x, ans;
  string s;
  cin >> t;
  for (j = 0; j < t; j++) {
    cin >> n >> c0 >> c1 >> h;
    count0 = 0;
    count1 = 0;
    cin >> s;
    for (i = 0; i < n; i++) {
      if (s[i] == '0')
        count0++;
      else if (s[i] == '1')
        count1++;
    }
    x = min(count1 * c1 + count0 * (h + c1), count1 * (h + c0) + count0 * c0);
    ans = min(x, count0 * c0 + count1 * c1);
    cout << ans << endl;
  }
}
