#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
int n = 0, m = 0, q = 0;
long long a = 0, b = 0;
char s[maxn];
void solve() {
  long long ans = 0;
  int pos1 = 0, pos2 = 0;
  int len = strlen(s);
  int cnt0 = 0, cnt1 = 0;
  for (int i = (0); i <= (len - 1); ++i) {
    if (s[i] == '1') {
      pos1 = i;
      break;
    }
    ++cnt0;
  }
  for (int i = (len - 1); i >= (0); --i) {
    if (s[i] == '1') {
      pos2 = i;
      break;
    }
    ++cnt1;
  }
  if (cnt1 == cnt0 && cnt1 == len) {
    ans = 1ll * (n + 1) * b + 1ll * n * a;
    printf("%I64d\n", ans);
    return;
  }
  ans += 1ll * (cnt0 + cnt1) * b;
  ans += 1ll * (n + 2) * a;
  for (int i = (pos1); i <= (pos2); ++i) {
    bool first = true;
    while (i <= pos2 && s[i] == '1') {
      if (first) {
        ans += 4 * b;
        first = false;
      } else {
        ans += 2 * b;
      }
      ++i;
    }
    int count = 0;
    while (i <= pos2 && s[i] == '0') {
      ++count;
      ++i;
    }
    if (count == 0) {
      break;
    }
    long long c1 = 1ll * (count - 1) * b + min(count - 1, 1) * 2 * a;
    long long c2 = 1ll * (count - 1) * 2 * b;
    ans += min(c1, c2);
    --i;
  }
  printf("%I64d\n", ans);
}
int main() {
  int T = 0;
  scanf("%d", &T);
  while (T--) {
    scanf("%d %I64d %I64d", &n, &a, &b);
    scanf("%s", s);
    solve();
  }
  return 0;
}
